-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (91 loc) · 2.43 KB
/
ci.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: ci
on:
push:
branches:
- '**'
tags-ignore:
- '*'
pull_request:
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: cat .github/super-linter.env >> "$GITHUB_ENV"
- uses: super-linter/super-linter@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- run: make versions
- run: make test
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: build/
- name: Validate the changelog
uses: ./
id: clq-validate
with:
changeMap: .github/clq/changemap.json
mode: feature
- name: Echo changelog values
run: |
echo "${name:?}"
echo "${tag:?} -- ${status:?}"
echo "${changes:?}"
env:
tag: ${{ steps.clq-validate.outputs.tag }}
name: ${{ steps.clq-validate.outputs.name }}
status: ${{ steps.clq-validate.outputs.status }}
changes: ${{ steps.clq-validate.outputs.changes }}
validate-release:
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Extract tag from the changelog
uses: ./
id: clq-extract
with:
changeMap: .github/clq/changemap.json
mode: release
- uses: denisa/semantic-tag-helper@v1
with:
mode: test
tag: ${{ steps.clq-extract.outputs.tag }}
tag:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [ lint, test, validate-release ]
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
steps:
- uses: actions/checkout@v4
- uses: ./
id: clq-extract
with:
changeMap: .github/clq/changemap.json
- uses: denisa/semantic-tag-helper@v1
with:
mode: set
tag: ${{ steps.clq-extract.outputs.tag }}
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.clq-extract.outputs.tag }}
prerelease: ${{ steps.clq-extract.outputs.status == 'prereleased' }}
name: ${{ steps.clq-extract.outputs.name }}
body: ${{ steps.clq-extract.outputs.changes }}