Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"fixed": [],
"linked": [],
"access": "public",
"canary": true,
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
- CI
branches:
- main
- beta
types:
- completed

jobs:
release:
name: Release
# run only if the CI workflow is successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
Expand Down Expand Up @@ -45,6 +46,34 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}
NPM_TOKEN: ${{ secrets.NPM_API_KEY }}
release_beta:
name: Release (beta)
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'beta' }}
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
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: 🚀 Publish Pre-release to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release -- --tag beta
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}
NPM_TOKEN: ${{ secrets.NPM_API_KEY }}

# cancel the jobs if another workflow is kicked off for the same branch
concurrency:
Expand Down