-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.31 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
name: Release
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: (!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci'))
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Unset header
# https://github.com/intuit/auto/issues/1030
run: git config --local --unset http.https://github.com/.extraheader
- name: Use Node.js 20.x LTS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: npm-deps-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-deps-${{ hashFiles('package-lock.json') }}
- name: Setup packages
run: |
npm ci
- name: Test
run: |
npm run test
- name: Release Info
run: npm whoami && npx auto info || echo 'auto info returned 1'
- name: Create Release
run: npm run release