-
Notifications
You must be signed in to change notification settings - Fork 322
57 lines (55 loc) · 1.6 KB
/
release.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release new version
on: workflow_dispatch
jobs:
prerequisites:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "Test"
command: "test"
- name: "Lint"
command: "lint"
- name: "Stylelint"
command: "stylelint"
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}}
- name: Run ${{matrix.name}}
shell: bash
run: yarn lerna run ${{matrix.command}} --since --include-filtered-dependencies
release:
needs: prerequisites
runs-on: ubuntu-latest
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: Run Build
shell: bash
run: yarn lerna run build
- name: Generate new versions
run: yarn lerna version --conventional-commits -y
- 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 to npm
run: yarn lerna publish from-package -y
- name: Remove .npmrc
if: steps.setup-npmrc.outcome == 'success'
run: rm .npmrc