-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1008 Bytes
/
publish.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
name: Publish
on:
release:
types: [published]
env:
NPM_TOKEN: ${{secrets.CDK_NPM_TOKEN}}
CI: true
jobs:
release-prod:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Tag
uses: olegtarasov/get-tag@v2.1
id: tagName
with:
tagRegex: '(?<package>.*)_(?<version>.*)'
- name: Set Node
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Set Version
run: |
echo "RELEASE_VERSION=${{ steps.tagName.outputs.version }}" >> $GITHUB_ENV
- name: Install
run: yarn
- name: Lint
run: |
yarn workspace ${{ steps.tagName.outputs.package }} run lint
- name: Test
run: |
yarn workspace ${{ steps.tagName.outputs.package }} run test
- name: Publish
run: |
yarn workspace ${{ steps.tagName.outputs.package }} run npm publish --tag latest