-
Notifications
You must be signed in to change notification settings - Fork 321
42 lines (40 loc) · 1.2 KB
/
release-v2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Release v2 version
on: workflow_dispatch
jobs:
release:
if: github.ref_name == 'version2'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/core
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Setup
uses: ./.github/actions/setup
with:
npm_token: ${{ secrets.npm_token }}
- uses: ./.github/actions/git-creds
- name: Build
run: yarn lerna run build --include-dependencies
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Stylelint
run: yarn stylelint
- name: Generate new core version
run: |
npm version patch -m "chore(release): bump core package version to %s"
- run: yarn config set registry https://registry.npmjs.org/
- name: Setup .npmrc for publish
id: setup-npmrc
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
- name: Publish core to npm
run: npm publish --dry-run
- name: Remove .npmrc
if: steps.setup-npmrc.outcome == 'success'
run: rm .npmrc