-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add canary release workflow (#1811)
- Loading branch information
Showing
4 changed files
with
169 additions
and
54 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,49 @@ | ||
name: Release Canary | ||
|
||
on: workflow_dispatch | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release-canary: | ||
permissions: | ||
contents: read # for checkout | ||
id-token: write # to enable use of OIDC for npm provenance | ||
runs-on: ubuntu-latest | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app-id: ${{ secrets.ECOSPARK_APP_ID }} | ||
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: canary | ||
token: ${{ steps.generate-token.outputs.token }} | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: lts/* | ||
- run: pnpm install --ignore-scripts | ||
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} | ||
- name: release canary & commit + push the changed versions | ||
env: | ||
NPM_CONFIG_PROVENANCE: true | ||
run: | | ||
pnpm release:canary | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "chore(release): publish canary [skip ci]" | ||
git push |
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
"lint:fix": "pnpm lint -- --fix", | ||
"prepare": "husky", | ||
"preview": "turbo run preview", | ||
"release:canary": "zx scripts/release-canary.mjs", | ||
"storybook:visual-editing": "turbo run build --filter='@sanity/visual-editing^...' && turbo watch dev storybook --filter='@sanity/visual-editing...'", | ||
"test": "turbo run test" | ||
}, | ||
|
@@ -48,7 +49,8 @@ | |
"prettier-plugin-tailwindcss": "0.6.6", | ||
"pretty-quick": "^4.0.0", | ||
"turbo": "2.1.1", | ||
"typescript": "5.6.2" | ||
"typescript": "5.6.2", | ||
"zx": "^8.1.5" | ||
}, | ||
"packageManager": "[email protected]", | ||
"pnpm": { | ||
|
Oops, something went wrong.