-
Notifications
You must be signed in to change notification settings - Fork 9
33 lines (29 loc) · 998 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
name: Release
on: workflow_dispatch
jobs:
release:
runs-on: macos-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js 17.x
uses: actions/setup-node@v3
with:
node-version: 17.x
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-17.x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-17.x
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}