Skip to content

Commit 3bd548d

Browse files
committed
fix: release pipeline
1 parent 63d1f0e commit 3bd548d

2 files changed

Lines changed: 20 additions & 25 deletions

File tree

.github/workflows/publish.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
1-
name: Publish
1+
name: Release & Publish
22
on:
3-
release:
4-
types: [ published ]
3+
push:
4+
branches: [ main ]
55

66
permissions:
7-
contents: read
7+
contents: write
8+
pull-requests: write
89
id-token: write
910

1011
jobs:
12+
release-please:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
release_created: ${{ steps.rp.outputs.release_created }}
16+
tag_name: ${{ steps.rp.outputs.tag_name }}
17+
steps:
18+
- id: rp
19+
uses: googleapis/release-please-action@v4
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
release-type: node
23+
1124
publish:
25+
needs: release-please
26+
if: needs.release-please.outputs.release_created == 'true'
1227
runs-on: ubuntu-latest
1328
steps:
1429
- uses: actions/checkout@v4
1530
with:
16-
ref: ${{ github.event.release.tag_name }}
17-
31+
ref: ${{ needs.release-please.outputs.tag_name }}
1832
- uses: actions/setup-node@v4
1933
with:
2034
node-version: 20
2135
registry-url: https://registry.npmjs.org
2236
cache: npm
23-
check-latest: true
24-
2537
- run: npm ci
2638
- run: npm run build
2739
- run: npm publish --provenance --access public

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)