-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release): add changesets to automatically manage releases
- Loading branch information
Showing
9 changed files
with
2,818 additions
and
71 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,10 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ "repo": "StackExchange/axe-apca" } | ||
], | ||
"commit": false, | ||
"access": "public", | ||
"baseBranch": "main" | ||
} |
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,5 @@ | ||
--- | ||
"axe-apca": patch | ||
--- | ||
|
||
Initial release |
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: | ||
workflow_run: | ||
workflows: | ||
- CI | ||
branches: | ||
- main | ||
types: | ||
- completed | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
# run only if the CI workflow is successful | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v3 | ||
# make sure to checkout the commit that triggered the CI workflow | ||
# (which is not necessarily the latest commit) | ||
with: | ||
ref: ${{ github.event.workflow_run.head_commit.id }} | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: 🏗 Install and Build | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: 🚀 Create/Update Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm publish | ||
version: npm version | ||
title: 'chore(new-release)' | ||
commit: 'chore(new-release)' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_API_KEY }} | ||
|
||
# cancel the jobs if another workflow is kicked off for the same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.