Skip to content

Commit d8f6616

Browse files
chore: migrate ci to npm trusted publishers (#49)
1 parent ef9ceb1 commit d8f6616

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

.github/workflows/next.yml

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

.github/workflows/publish.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ name: Publish
33
on:
44
release:
55
types: [released]
6+
workflow_dispatch:
7+
8+
run-name: >-
9+
${{
10+
github.event_name == 'release' && 'Publish Release'
11+
|| github.event_name == 'workflow_dispatch' && 'Publish Next'
12+
|| 'Publish Release' }}
613
714
jobs:
8-
build:
15+
publish-release:
16+
if: github.event_name == 'release'
17+
918
runs-on: ubuntu-latest
1019

1120
permissions:
@@ -20,5 +29,22 @@ jobs:
2029
- run: npm run build --workspaces
2130
- name: Publish
2231
run: ./scripts/publish-npm.sh
23-
env:
24-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
32+
33+
publish-next:
34+
if: github.event_name == 'workflow_dispatch'
35+
36+
runs-on: ubuntu-latest
37+
38+
permissions:
39+
contents: read
40+
id-token: write
41+
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: Prepare
46+
uses: ./.github/actions/prepare
47+
- name: Build next version
48+
run: ./scripts/build-next
49+
- name: Publish
50+
run: ./scripts/publish-npm-next.sh

0 commit comments

Comments
 (0)