-
Notifications
You must be signed in to change notification settings - Fork 32
61 lines (50 loc) · 1.41 KB
/
ci.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
name: ci
on: push
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: npm install
- run: npm run test
# run only on semantic version tag
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: checkout
uses: actions/checkout@v4
# # GITHUB_ENV operates like a .env file
# - name: extract version
# run: |
# VERSION=${GITHUB_REF#refs/tags/}
# CLEAN_VERSION=${VERSION#v}
# echo "VERSION=$VERSION" >> $GITHUB_ENV
# echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
- name: node
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: npm install
run: npm install
- name: dist
run: |
mkdir -p dist
- name: pack
run: npx [email protected] pack tarballs
- name: create release
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.tar.gz
body: "see [CHANGELOG](https://github.com/dotenv-org/dotenv-vault/blob/master/CHANGELOG.md)"
- name: add checksums to release
uses: wangzuo/action-release-checksums@v1