-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7db452
commit 7de1070
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -10,6 +10,8 @@ jobs: | |
contents: write | ||
# release merge commits come from GitHub user | ||
if: github.event.head_commit.committer.name == 'GitHub' | ||
outputs: | ||
IS_RELEASE: ${{ steps.check-release.outputs.IS_RELEASE }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -18,20 +20,29 @@ jobs: | |
# we need this commit + the last so we can compare below | ||
fetch-depth: 2 | ||
# exit early if the version has not changed | ||
- run: ./scripts/check-version.sh ${{ github.event.before }} | ||
- name: Check Release | ||
id: check-release | ||
run: ./scripts/check-release.sh ${{ github.event.before }} | ||
- name: Get Node.js version | ||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} | ||
id: nvm | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
- uses: actions/setup-node@v2 | ||
- name: Setup Node | ||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | ||
- uses: MetaMask/[email protected] | ||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: | | ||
- name: Install | ||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} | ||
run: | | ||
yarn install | ||
yarn build | ||
- uses: actions/cache@v3 | ||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} | ||
id: restore-build | ||
with: | ||
path: ./dist | ||
|
@@ -40,6 +51,7 @@ jobs: | |
publish-npm-dry-run: | ||
runs-on: ubuntu-latest | ||
needs: publish-release | ||
if: ${{ needs.publish-release.outputs.IS_RELEASE == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
@@ -61,6 +73,7 @@ jobs: | |
environment: npm-publish | ||
runs-on: ubuntu-latest | ||
needs: publish-npm-dry-run | ||
if: ${{ needs.publish-release.outputs.IS_RELEASE == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
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