-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
3fa2929
commit 9b123d8
Showing
2 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
concurrency: | ||
group: release-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-22.04 | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '16' | ||
|
||
- name: Setup yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Check dist updated | ||
run: | | ||
yarn build | ||
git diff --quiet -- dist || { | ||
echo "::error::The ./dist is outdated, run 'yarn build' and commit" | ||
exit 1 | ||
} | ||
- uses: ncipollo/[email protected] | ||
id: release | ||
with: | ||
draft: ${{ contains(github.ref, '-draft') }} | ||
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} | ||
generateReleaseNotes: true | ||
allowUpdates: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Workflow notices | ||
run: echo "::notice title=Release::${{ steps.release.outputs.html_url }}" |
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 |
---|---|---|
|
@@ -16,8 +16,20 @@ jobs: | |
- name: Check out code | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '16' | ||
|
||
- name: Setup yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Check diff is up to date | ||
run: | | ||
yarn build | ||
git diff --quiet -- dist || { | ||
echo "::error::The ./dist is outdated, run 'yarn build' and commit" | ||
exit 1 | ||
|