Skip to content

Commit 84feb7e

Browse files
committed
Release
1 parent db5fd2b commit 84feb7e

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

.github/workflows/release.yml

+36-13
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,65 @@ on:
44
push:
55
tags: ["v*"]
66

7+
permissions: write-all
8+
79
jobs:
810
checks:
911
runs-on: ubuntu-latest
1012
name: Checks
1113
steps:
12-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1315
with:
1416
fetch-depth: 0
15-
- uses: actions/setup-node@v3
17+
- uses: actions/setup-node@v4
1618
with:
17-
node-version: 16
18-
- uses: pnpm/action-setup@v2
19+
node-version: 20
20+
- uses: pnpm/action-setup@v3
1921
with:
2022
run_install: true
2123
- run: |
2224
cd packages/bento-design-system
2325
pnpm version --no-git-tag-version --new-version ${{ github.ref_name }}
26+
2427
- name: Commit & Push changes
2528
uses: actions-js/push@master
2629
with:
2730
message: ${{ github.ref_name }}
2831
github_token: ${{ secrets.GITHUB_TOKEN }}
29-
- name: Publish
30-
run: |
31-
cd packages/bento-design-system
3232

33-
# publish on npm
34-
pnpm config set '//registry.npmjs.org/:_authToken' ${{ secrets.NPM_TOKEN }}
35-
pnpm publish --git-checks false
33+
- name: Publish to npm
34+
uses: JS-DevTools/npm-publish@v3
35+
with:
36+
package: "packages/bento-design-system/package.json"
37+
token: ${{ secrets.NPM_TOKEN }}
38+
access: "public"
39+
provenance: true
40+
41+
- name: Publish to Github
42+
uses: JS-DevTools/npm-publish@v3
43+
with:
44+
package: "packages/bento-design-system/package.json"
45+
registry: "https://npm.pkg.github.com"
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
access: "public"
48+
provenance: true
3649

37-
# publish on GitHub Packages
38-
pnpm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
39-
pnpm publish --git-checks false --access public --registry=https://npm.pkg.github.com
4050
- uses: slackapi/[email protected]
51+
if: ${{ job.status == 'success' }}
4152
env:
4253
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
54+
JOB_STATUS: ${{ job.status }}
55+
ATTACHMENT_COLOR: "good"
4356
with:
4457
channel-id: bento
4558
slack-message: ":tada: Version ${{ github.ref_name }} has been released!"
59+
60+
- uses: slackapi/[email protected]
61+
if: ${{ job.status == 'failure' }}
62+
env:
63+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
64+
JOB_STATUS: ${{ job.status }}
65+
ATTACHMENT_COLOR: "danger"
66+
with:
67+
channel-id: bento
68+
slack-message: ":x: Version ${{ github.ref_name }} failed to release"

0 commit comments

Comments
 (0)