Skip to content

Commit 1929dd2

Browse files
committed
ci: move publishing to a separate job
1 parent 9fad205 commit 1929dd2

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Diff for: .github/workflows/release.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,42 @@ on:
33
branches:
44
- main
55

6-
permissions:
7-
contents: write
8-
pull-requests: write
9-
106
name: release-please
117

128
jobs:
139
release-please:
1410
runs-on: ubuntu-latest
1511

12+
outputs:
13+
release_created: ${{ steps.release.outputs.release_created }}
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
1619
steps:
1720
- uses: googleapis/release-please-action@v4
1821
id: release
1922
with:
2023
release-type: node
2124

25+
publish:
26+
needs: release-please
27+
runs-on: ubuntu-latest
28+
if: ${{ needs.release-please.outputs.release_created }}
29+
30+
steps:
2231
- uses: actions/checkout@v4
23-
if: ${{ steps.release.outputs.release_created }}
2432

2533
- run: corepack enable
26-
if: ${{ steps.release.outputs.release_created }}
2734

2835
- uses: actions/setup-node@v4
29-
if: ${{ steps.release.outputs.release_created }}
3036
with:
3137
node-version: 18
3238
cache: yarn
3339

3440
- run: yarn
35-
if: ${{ steps.release.outputs.release_created }}
3641

3742
- run: yarn npm publish --access public
38-
if: ${{ steps.release.outputs.release_created }}
3943
env:
4044
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)