-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.22 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
name: CI
on:
- push
- pull_request
jobs:
test:
name: Test on nginx ${{ matrix.nginx }}
runs-on: ubuntu-latest
strategy:
matrix:
nginx:
- 1.22.x
- 1.24.x
- 1.25.x
steps:
- uses: actions/checkout@v4
- run: make deps
- run: make build
- run: make test NGINX_VERSION=${{ matrix.nginx }}
- run: make lint
- uses: actions/upload-artifact@v4
# Run only in the first job.
if: strategy.job-index == 0
with:
path: dist/*
if-no-files-found: error
release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') && github.event_name != 'pull_request'
needs:
- test
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: make deps
- run: make build
- name: Create tarball
run: |
VERSION=${GITHUB_REF##*/}
make tarball VERSION=${VERSION#v}
- name: Upload tarball to Releases
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.tar.gz
dist/*.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}