Skip to content

Commit 8324ea9

Browse files
committed
ci: consolidate publishing into single release workflow
Merge snapshot-release.yml and changesets.yml into release.yml so only one workflow file needs to be registered as npm trusted publisher. On push to dev: 1. Build + test 2. changesets/action creates version PR or publishes stable release 3. If stable wasn't published, publish canary snapshot
1 parent 107550e commit 8324ea9

File tree

2 files changed

+11
-44
lines changed

2 files changed

+11
-44
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changesets
1+
name: Release
22

33
on:
44
push:
@@ -35,10 +35,20 @@ jobs:
3535
- name: Build
3636
run: bun run build
3737

38+
- name: Unit tests
39+
run: bun run test:unit
40+
3841
- name: Create release PR or publish
42+
id: changesets
3943
uses: changesets/action@v1
4044
with:
4145
publish: bun run release
4246
version: bun run version
4347
env:
4448
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Publish canary snapshot
51+
if: steps.changesets.outputs.published != 'true'
52+
run: |
53+
npx changeset version --snapshot canary
54+
npx changeset publish --tag canary --no-git-tag

.github/workflows/snapshot-release.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)