forked from TarheelGrad1998/gallery-card
-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (33 loc) · 1.11 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
name: Release
on: workflow_dispatch
jobs:
release-bundle:
runs-on: ubuntu-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:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js 20.x
uses: actions/[email protected]
with:
node-version: 20.x
- name: Cache Node.js modules
uses: actions/[email protected]
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-20.x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-20.x
${{ runner.OS }}-
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}