fix: fix parallel platform builds #7
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 | |
on: | |
push: | |
branches: | |
- release | |
- beta | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
semantic-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: create_token # get ReleaseBot access token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.RELEASE_BOT_APP_ID }} | |
private_key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
id: semantic # Need an `id` for output variables | |
env: | |
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }} | |
with: | |
semantic_version: 23.0.8 | |
build: | |
needs: semantic-release | |
strategy: | |
matrix: | |
build: | |
- os: ubuntu-latest | |
task: linux | |
- os: windows-latest | |
task: win | |
- os: macos-latest | |
task: mac | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- if: matrix.build.os == 'ubuntu-latest' | |
run: sudo snap install snapcraft --classic | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install -g yarn | |
- run: yarn | |
- run: yarn build | |
if: needs.semantic-release.outputs.semantic.outputs.new_release_published == 'true' | |
- run: yarn prepare-release | |
if: needs.semantic-release.outputs.semantic.outputs.new_release_published == 'true' | |
- run: yarn package ${{ matrix.build.task }} | |
if: needs.semantic-release.outputs.semantic.outputs.new_release_published == 'true' | |
env: | |
EP_PRE_RELEASE: 'true' | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} |