-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,42 +4,65 @@ on: | |
push: | ||
tags: ["v*"] | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
name: Checks | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/action-setup@v2 | ||
node-version: 20 | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
run_install: true | ||
- run: | | ||
cd packages/bento-design-system | ||
pnpm version --no-git-tag-version --new-version ${{ github.ref_name }} | ||
- name: Commit & Push changes | ||
uses: actions-js/push@master | ||
with: | ||
message: ${{ github.ref_name }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish | ||
run: | | ||
cd packages/bento-design-system | ||
|
||
# publish on npm | ||
pnpm config set '//registry.npmjs.org/:_authToken' ${{ secrets.NPM_TOKEN }} | ||
pnpm publish --git-checks false | ||
- name: Publish to npm | ||
uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: "packages/bento-design-system/package.json" | ||
token: ${{ secrets.NPM_TOKEN }} | ||
access: "public" | ||
provenance: true | ||
|
||
- name: Publish to Github | ||
uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: "packages/bento-design-system/package.json" | ||
registry: "https://npm.pkg.github.com" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
access: "public" | ||
provenance: true | ||
|
||
# publish on GitHub Packages | ||
pnpm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }} | ||
pnpm publish --git-checks false --access public --registry=https://npm.pkg.github.com | ||
- uses: slackapi/[email protected] | ||
if: ${{ job.status == 'success' }} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
JOB_STATUS: ${{ job.status }} | ||
ATTACHMENT_COLOR: "good" | ||
with: | ||
channel-id: bento | ||
slack-message: ":tada: Version ${{ github.ref_name }} has been released!" | ||
|
||
- uses: slackapi/[email protected] | ||
if: ${{ job.status == 'failure' }} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
JOB_STATUS: ${{ job.status }} | ||
ATTACHMENT_COLOR: "danger" | ||
with: | ||
channel-id: bento | ||
slack-message: ":x: Version ${{ github.ref_name }} failed to release" |