-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1003 Bytes
/
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
name: Release
on:
push:
paths:
- package.json
branches:
- main
- v1
jobs:
build-and-publish:
name: Build & Publish Release
runs-on: ubuntu-latest
environment: 'prod'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Publish Package
id: publish
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
access: public
strategy: upgrade
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.publish.outputs.version }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="Release ${tag#v}" \
--generate-notes