-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 pass version from prepare to build job
- Loading branch information
1 parent
0cc77a4
commit bbbb1dc
Showing
3 changed files
with
64 additions
and
124 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,63 @@ name: Release | |
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: [Prepare] | ||
types: [completed] | ||
branches: [develop] | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build-release: | ||
if: ${{ github.event.workflow_run.conclusion != 'failure' }} | ||
name: Release | ||
prepare: | ||
name: Prepare | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
outputs: | ||
next_version: ${{ steps.semantic_step.outputs.next_version }} | ||
|
||
steps: | ||
- name: Checkout git repo | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
node-version: 18.11.0 | ||
|
||
- name: Install Yarn | ||
run: corepack enable | | ||
corepack prepare [email protected] --activate | | ||
corepack yarn config set enableImmutableInstalls false | ||
|
||
- name: Install dependencies | ||
run: corepack yarn install | ||
|
||
- name: Building Packages | ||
run: corepack yarn build | ||
|
||
- name: Testing | ||
run: corepack yarn run test | ||
|
||
- name: Semantic Release | ||
id: semantic_step | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: corepack yarn run semantic-release | ||
release: | ||
needs: prepare | ||
name: Release v${{ needs.prepare.outputs.next_version }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-2019] | ||
|
||
|
@@ -23,6 +68,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_TOKEN_SEMANTIC_RELEASE }} | ||
ref: v${{ needs.prepare.outputs.next_version }} | ||
|
||
- name: apt-get install | ||
if: matrix.os == 'ubuntu-latest' | ||
|
@@ -36,28 +82,19 @@ jobs: | |
|
||
- name: Install Yarn | ||
run: corepack enable | | ||
corepack prepare [email protected] --activate | ||
|
||
- name: Extract cached dependencies | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
|
||
- name: Update dependencies | ||
run: corepack yarn --immutable | ||
|
||
- name: Yarn Plugins | ||
run: yarn plugin import plugin-workspace-tools && | ||
yarn plugin import plugin-typescript && | ||
yarn plugin import https://yarn.build/latest | ||
corepack prepare [email protected] --activate | | ||
corepack yarn config set enableImmutableInstalls false | | ||
corepack yarn cache clean | ||
|
||
- name: Install Dependecies | ||
run: yarn install | ||
- name: Install dependencies | ||
run: corepack yarn install | ||
|
||
- name: Building Packages | ||
run: yarn build | ||
run: corepack yarn run build | ||
|
||
- name: Publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: yarn electron-forge publish | ||
NODE_OPTIONS: --max-old-space-size=8192 | ||
DEBUG: '*' | ||
run: corepack yarn electron-forge publish |
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