-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.33 KB
/
create-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
name: create-release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract changelog
run: |
cat CHANGELOG.md | perl -e '
BEGIN {
$myversion = $ENV{"GITHUB_REF_NAME"};
$myversion =~ s/^v//;
}
while(<STDIN>) {
if(/^## *\[\Q$myversion\E\]/) {
$flag = 1;
} elsif(/^## *\[[0-9.]*\]/) {
$flag = 0;
} elsif($flag) {
print;
}
}' > release-changelog.md
# Fail if the changelog is empty, i.e. there is no changelog for this release
[ -s release-changelog.md ]
- name: Create release artifacts
run: |
sed "s/DEFAULT_IMAGE_TAG=latest/DEFAULT_IMAGE_TAG=${GITHUB_REF_NAME#v}/" install/get-teamware.sh > ./get-teamware.sh
tar cvzf install.tar.gz README.md docker-compose*.yml generate-docker-env.sh create-django-db.sh nginx custom-policies Caddyfile backup_manual.sh backup_restore.sh
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: release-changelog.md
files: |
get-teamware.sh
install.tar.gz