-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 2.22 KB
/
publish-qcw-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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish tagged QCW release
on:
workflow_dispatch:
inputs:
release_name:
description: 'Release name'
required: true
type: string
release_tag:
description: 'Release tag'
required: true
type: string
release_highlights:
description: 'Release highlights'
default: 'TBD.'
required: true
type: string
jobs:
call-prepare-docker:
uses: ./.github/workflows/prepare-docker-release.yml
publish:
needs: call-prepare-docker
runs-on: ubuntu-latest
steps:
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "🛻 Donwload artifacts"
uses: actions/download-artifact@v4
with:
path: qcw
- name: "🗒️ Prepare release notes"
env:
DOCKER_VERSION: ${{ needs.call-prepare-docker.outputs.cli_versions }}
DOCKER_COMPOSE_VERSION: ${{ needs.call-prepare-docker.outputs.compose_versions }}
run: |
cat ./*/*/sha.checksums | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- > sha.sums
ARTSIZE=`cat sha.sums | wc -l`
ARTSIZE2=$((ARTSIZE / 2))
sed -e "s/<<SHA256>>/$(head -n $ARTSIZE2 sha.sums | sort -k 2 | sed -z 's:\n:\\n:g' | sed 's:/:\\/:g')/g" -i release.template.md
sed -e "s/<<SHA512>>/$(tail -n $ARTSIZE2 sha.sums | sort -k 2 | sed -z 's:\n:\\n:g' | sed 's:/:\\/:g')/g" -i release.template.md
sed 's/<<TAG_NAME>>/${{ inputs.release_tag }}/g' -i release.template.md
sed 's/<<RELEASE_HIGHLIGHTS>>/${{ inputs.release_highlights }}/g' -i release.template.md
sed "s/<<DOCKER_VERSION>>/$DOCKER_VERSION/g" -i release.template.md
sed "s/<<DOCKER_COMPOSE_VERSION>>/$DOCKER_COMPOSE_VERSION/g" -i release.template.md
- name: "🏷️ Publish release"
uses: ncipollo/release-action@v1
with:
name: ${{ inputs.release_name }}
prerelease: "true"
artifacts: "qcw/**/*.exe"
bodyFile: "release.template.md"
tag: ${{ inputs.release_tag }}
commit: "update-workflows"