-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (51 loc) · 1.46 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
58
59
60
61
62
63
64
name: Release
on:
workflow_dispatch:
push:
paths:
- package.json
branches:
- main
jobs:
version-change-check:
name: Check Package Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Package Version
uses: EndBug/[email protected]
id: check
- name: Cancel
if: steps.check.outputs.changed == 'false'
uses: andymckay/[email protected]
build-and-publish:
name: Build & Publish Release
runs-on: ubuntu-latest
needs: [version-change-check]
environment: 'prod'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci install
- name: Build package
run: npm run build
- name: Publish Package
id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
access: public
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.publish.outputs.version }}
release_name: Release ${{ steps.publish.outputs.version }}
body: |
Please refer to [CHANGELOG.md](https://github.com/PrefectHQ/vue-compositions/blob/main/CHANGELOG.md) for details.