-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: canary and release workflows (#14)
- Loading branch information
Showing
2 changed files
with
70 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,36 @@ | ||
name: Canary release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
canary-publish: | ||
name: Publish Packages (canary) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: "https://registry.npmjs.org" | ||
cache: "yarn" | ||
|
||
- name: Install Dependencies | ||
working-directory: ./js | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build | ||
working-directory: ./js | ||
run: yarn build | ||
|
||
- name: Update version | ||
working-directory: ./js | ||
run: yarn version --new-version "0.0.0-${GITHUB_SHA::8}" --no-git-tag-version | ||
|
||
- name: Publish | ||
working-directory: ./js | ||
run: npm publish --access public --tag canary | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,34 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: "https://registry.npmjs.org" | ||
cache: "yarn" | ||
|
||
- name: Install Dependencies | ||
working-directory: ./js | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build | ||
working-directory: ./js | ||
run: yarn build | ||
|
||
- name: Publish | ||
working-directory: ./js | ||
run: yarn publish --access public --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |