Skip to content

Commit a0c04f6

Browse files
committed
chore: release github action
1 parent 3ac7661 commit a0c04f6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout PR branch
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Job and Install Dependencies
15+
uses: ./.github/actions/setup-job
16+
17+
- name: Create Release Pull Request or Publish to npm
18+
id: changesets
19+
uses: changesets/action@v1
20+
with:
21+
title: 'chore: release'
22+
commit: 'chore: release new versions #publish'
23+
# This expects you to have a script called release / version:packages
24+
# which does a build for your packages and calls changeset publish
25+
publish: yarn release
26+
version: yarn version:packages
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"process-icons": "wireit",
6161
"publish:react": "yarn changeset publish --no-git-tag --tag snapshot --no-push",
6262
"push-to-remote": "git add . && git commit -m \"chore: release new versions #publish\" && git push",
63+
"release": "yarn build && changeset publish",
6364
"start": "yarn storybook",
6465
"storybook": "wireit",
6566
"storybook:build": "NODE_ENV=production storybook build -o projects/documentation/dist/storybook -c storybook",
@@ -82,6 +83,7 @@
8283
"test:watch:flags:focus": "yarn build && run-p build:watch \"test:start --watch --group {1} --config web-test-runner.config.ci-chromium-flags.js\" --",
8384
"test:watch:focus": "yarn build && run-p build:watch \"test:start --watch --group {1}\" --",
8485
"version:update": "genversion --verbose --semi --esm ./tools/base/src/version.js",
86+
"version:packages": "yarn config set -H enableImmutableInstalls false && changeset version && yarn lint",
8587
"vrt:preview": "yarn wds --config test/visual/wds-vrt.config.js",
8688
"vrt:quick-link": "yarn netlify deploy --alias=vrt --dir=projects/vrt-quick-link"
8789
},

0 commit comments

Comments
 (0)