-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (63 loc) · 2.08 KB
/
main.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
61
62
63
name:
CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * MON'
jobs:
test:
name: 'Testing'
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ['debian-buster', 'debian-bullseye', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04']
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Dependency Review'
uses: actions/[email protected]
continue-on-error: true
with:
head-ref: ${{ github.ref }}
base-ref: ec53ee4956ff702efdf1f7a06c87fdfe821dff0f
fail-on-severity: low
allow-licenses: MIT, BSD-2-Clause, BSD-3-Clause, Apache-1.1, Apache-2.0
- name: 'Test README.md Instructions'
env:
PROJECT_NAME: ${{ github.event.repository.name }}
DOCKER_IMAGE: ${{ matrix.docker_image }}
run: |
.github/docker/launcher.sh
shell: bash
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v3
with:
name: 'executed-test-scripts'
path: |
~/${{ github.event.repository.name }}_${{ matrix.docker_image }}/${{ github.event.repository.name }}_${{ matrix.docker_image }}.sh
release:
name: 'Create Release'
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Changelog Pruning'
run: |
sed -n `awk '/## \[${{ github.ref_name }}/{c++} c==1{ print NR; exit }' CHANGELOG.md`',$p' CHANGELOG.md > .CHANGELOG.md.tmp
sed `awk '/## \[[x0-9]/{c++} c==2{ print NR; exit }' .CHANGELOG.md.tmp`',$d' .CHANGELOG.md.tmp > ${{ github.workspace }}-CHANGELOG.txt
- name: 'Create Release'
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
files: |
LICENSE