Release 0.66.0 #282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build/Release | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'master' | |
env: | |
CI: false | |
BRANCH: ${{ github.head_ref || github.ref_name }} | |
BRANCH_NAME: '' | |
jobs: | |
generate-variables: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
outputs: | |
ocd_version: ${{ steps.version.outputs.ocd_version }} | |
okit_release_version: ${{ steps.version.outputs.okit_release_version }} | |
okit_release_tag: ${{ steps.version.outputs.okit_release_tag }} | |
okit_release_title: ${{ steps.version.outputs.okit_release_title }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: version | |
run: | | |
echo "ocd_version=$(jq -r '.version' ocd/packages/desktop/package.json)" >> "$GITHUB_OUTPUT" | |
echo "okit_release_version=$(jq -r '.release' okitweb/static/okit/json/release.json)" >> "$GITHUB_OUTPUT" | |
echo "okit_release_tag=$(jq -r '.tag' okitweb/static/okit/json/release.json)" >> "$GITHUB_OUTPUT" | |
echo "okit_release_title=$(jq -r '.title' okitweb/static/okit/json/release.json)" >> "$GITHUB_OUTPUT" | |
create-release: | |
needs: [generate-variables] | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_TAG: ${{ needs.generate-variables.outputs.okit_release_tag }} | |
RELEASE_TITLE: ${{ needs.generate-variables.outputs.okit_release_title }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Release | |
id: create_release | |
run: | | |
gh release create ${{ env.RELEASE_TAG }} --title "${{ env.RELEASE_TITLE }}" --notes-file ./RELEASE_NOTES.md --target master --latest | |
build-and-release: | |
needs: [create-release, generate-variables] | |
if: github.event.pull_request.merged == true | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
version: [22.11.0] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_TAG: ${{ needs.generate-variables.outputs.okit_release_tag }} | |
OCD_VERSION: ${{ needs.generate-variables.outputs.ocd_version }} | |
NODE_OPTIONS: "--max-old-space-size=8192" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.version }} | |
- run: node --version | |
- run: npm --version | |
# - name: Install Snapcraft on Ubuntu | |
# if: startsWith(matrix.os, 'ubuntu') | |
# run: sudo snap install snapcraft --classic | |
- run: npm run github-action-install | |
- run: npm run github-action-compile-for-codegen | |
- run: npm run github-action-generate | |
- run: npm run github-action-build | |
# - run: npm run github-action-compile | |
# - run: npm run github-action-pack | |
# - run: npm run github-action-build-react | |
# - run: npm run github-action-build-electron | |
- run: ls -R ./ocd/dist | |
if: always() | |
- name: Upload Mac Artifact to Release | |
if: matrix.os == 'macos-latest' | |
run: | | |
npm run github-action-build-macos-x86 | |
gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/make/ocd-${{ env.OCD_VERSION }}-*.dmg --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/mac/ocd-${{ env.OCD_VERSION }}-*.dmg --clobber | |
- name: Upload Windows Artifact to Release | |
if: matrix.os == 'windows-latest' | |
run: | | |
ls ./ocd/dist/make/squirrel.windows/x64 | |
gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/make/squirrel.windows/x64/ocd-${{ env.OCD_VERSION }}*.exe --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/win/ocd-${{ env.OCD_VERSION }}-x64.exe --clobber | |
- name: Upload Linux Artifact to Release | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/make/rpm/x64/ocd-${{ env.OCD_VERSION }}-*.rpm --clobber | |
gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/make/deb/x64/ocd_${{ env.OCD_VERSION }}*.deb --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/linux/ocd-${{ env.OCD_VERSION }}.rpm --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/linux/ocd-${{ env.OCD_VERSION }}.deb --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/linux/ocd-${{ env.OCD_VERSION }}-*.snap --clobber | |
# gh release upload ${{ env.RELEASE_TAG }} ./ocd/dist/linux/ocd-${{ env.OCD_VERSION }}-*.AppImage --clobber |