Skip to content

Commit 7dd8e8e

Browse files
committedDec 12, 2024
Update release workflow
1 parent de7e572 commit 7dd8e8e

5 files changed

+95
-15
lines changed
 

‎.github/workflows/prepare-docker-release.yml

+18
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,28 @@ name: Prepare QCW Docker (from revision)
33
on:
44
workflow_dispatch:
55
workflow_call:
6+
outputs:
7+
cli_version:
8+
description: "Docker CLI version"
9+
value: ${{ jobs.build.outputs.cli_version }}
10+
compose_version:
11+
description: "Docker Compose version"
12+
value: ${{ jobs.build.outputs.compose_version }}
613

714
env:
815
CLI_GITURL: https://github.com/docker/cli.git
916
CLI_SHA: bde2b893136c1c7a2894386e4f8743089c89b041 # v27.4.0
17+
CLI_VERSION: 27.4.0
1018
COMPOSE_GITURL: https://github.com/docker/compose.git
1119
COMPOSE_SHA: a8469db83f514a5abe4681c7fee773061f1941c6 # v2.31.0
20+
COMPOSE_VERSION: 2.31.0
1221

1322
jobs:
1423
build:
1524
runs-on: ubuntu-latest
25+
outputs:
26+
cli_version: ${{ steps.make_versions.outputs.cli }}
27+
compose_version: ${{ steps.make_versions.outputs.compose }}
1628

1729
steps:
1830
- name: 🏗️ Install Docker Buildx
@@ -63,6 +75,12 @@ jobs:
6375
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
6476
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
6577
cat sha.checksums
78+
79+
- id: make_versions
80+
name: "📌 Export versions"
81+
run: |
82+
echo "cli=$CLI_VERSION" >> "$GITHUB_OUTPUT"
83+
echo "compose=$COMPOSE_VERSION" >> "$GITHUB_OUTPUT"
6684
6785
- name: "🚀 Upload artifact"
6886
uses: actions/upload-artifact@v4

‎.github/workflows/prepare-podman-release.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
name: Prepare QCW Podman (from revision)
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
outputs:
7+
podman_version:
8+
description: Podman version"
9+
value: ${{ jobs.build.outputs.podman_version }}
410

511
env:
612
PODMAN_GITURL: https://github.com/containers/podman.git
713
PODMAN_SHA: 4cbdfde5d862dcdbe450c0f1d76ad75360f67a3c # v5.3.1
14+
PODMAN_VERSION: 5.3.1
815
PODMAN_REVISION_KIND: prod # prod|dev
916

1017
jobs:
1118
build:
1219
runs-on: windows-latest
20+
outputs:
21+
podman_version: ${{ steps.make_versions.outputs.podman }}
1322

1423
steps:
1524
- name: "🏗️ Install msys2"
@@ -102,6 +111,12 @@ jobs:
102111
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
103112
cat sha.checksums
104113
114+
- id: make_versions
115+
name: "📌 Export versions"
116+
shell: msys2 {0}
117+
run: |
118+
echo "podman=$PODMAN_VERSION" >> "$GITHUB_OUTPUT"
119+
105120
- name: "🚀 Upload artifact"
106121
uses: actions/upload-artifact@v4
107122
with:

‎.github/workflows/prepare-qemu-release.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Prepare QCW QEMU (from TarBall sources)
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
outputs:
7+
qemu_version:
8+
description: QEMU version"
9+
value: ${{ jobs.build.outputs.qemu_version }}
410

511
env:
612
QEMU_VERSION: 9.2.0
@@ -9,6 +15,8 @@ env:
915
jobs:
1016
build:
1117
runs-on: windows-latest
18+
outputs:
19+
qemu_version: ${{ steps.make_versions.outputs.qemu }}
1220

1321
steps:
1422
- name: "🏗️ Install msys2"
@@ -113,6 +121,12 @@ jobs:
113121
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
114122
cat sha.checksums
115123
124+
- id: make_versions
125+
name: "📌 Export versions"
126+
shell: msys2 {0}
127+
run: |
128+
echo "qemu=$QEMU_VERSION" >> "$GITHUB_OUTPUT"
129+
116130
- name: "🚀 Upload artifact"
117131
uses: actions/upload-artifact@v4
118132
with:

‎.github/workflows/publish-qcw-release.yml

+42-12
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@ name: Publish tagged QCW release
22

33
on:
44
workflow_dispatch:
5-
release_name:
6-
description: 'Release name'
7-
required: true
8-
type: string
9-
release_tag:
10-
description: 'Release tag'
11-
required: true
12-
type: string
5+
inputs:
6+
release_name:
7+
description: 'Release name'
8+
required: true
9+
type: string
10+
release_tag:
11+
description: 'Release tag'
12+
required: true
13+
type: string
14+
release_highlights:
15+
description: 'Release highlights'
16+
default: 'TBD.'
17+
required: true
18+
type: string
1319

1420
jobs:
1521
call-prepare-docker:
1622
uses: ./.github/workflows/prepare-docker-release.yml
1723

18-
prepare:
19-
needs: call-prepare-docker
24+
call-prepare-podman:
25+
uses: ./.github/workflows/prepare-podman-release.yml
26+
27+
call-prepare-qemu:
28+
uses: ./.github/workflows/prepare-qemu-release.yml
29+
30+
publish:
31+
needs: [call-prepare-docker, call-prepare-podman, call-prepare-qemu]
2032
runs-on: ubuntu-latest
2133

2234
steps:
@@ -34,8 +46,26 @@ jobs:
3446
path: qcw
3547

3648
- name: "🗒️ Prepare release notes"
49+
env:
50+
DOCKER_VERSION: ${{ needs.call-prepare-docker.outputs.cli_version }}
51+
DOCKER_COMPOSE_VERSION: ${{ needs.call-prepare-docker.outputs.compose_version }}
52+
PODMAN_VERSION: ${{ needs.call-prepare-podman.outputs.podman_version }}
53+
QEMU_VERSION: ${{ needs.call-prepare-qemu.outputs.qemu_version }}
54+
BUILD_LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
3755
run: |
38-
sed 's/<<TAG_NAME>>/${{ inputs.release_tag }}/g' release.template.md
56+
cat ./*/*/sha.checksums | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- > sha.sums
57+
ARTSIZE=`cat sha.sums | wc -l`
58+
ARTSIZE2=$((ARTSIZE / 2))
59+
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
60+
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
61+
sed 's/<<TAG_NAME>>/${{ inputs.release_tag }}/g' -i release.template.md
62+
sed 's/<<RELEASE_HIGHLIGHTS>>/${{ inputs.release_highlights }}/g' -i release.template.md
63+
sed "s/<<DOCKER_VERSION>>/$DOCKER_VERSION/g" -i release.template.md
64+
sed "s/<<DOCKER_COMPOSE_VERSION>>/$DOCKER_COMPOSE_VERSION/g" -i release.template.md
65+
sed "s/<<PODMAN_VERSION>>/$PODMAN_VERSION/g" -i release.template.md
66+
sed "s/<<QEMU_VERSION>>/$QEMU_VERSION/g" -i release.template.md
67+
sed -e "s/<<BUILD_LOG_URL>>/$(echo $BUILD_LOG_URL | sed 's:/:\\/:g')/g" -i release.template.md
68+
cat release.template.md
3969
4070
- name: "🏷️ Publish release"
4171
uses: ncipollo/release-action@v1
@@ -45,4 +75,4 @@ jobs:
4575
artifacts: "qcw/**/*.exe"
4676
bodyFile: "release.template.md"
4777
tag: ${{ inputs.release_tag }}
48-
commit: "update-workflows"
78+
commit: "main"

‎release.template.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Highlights
2-
TBD.
2+
<<RELEASE_HIGHLIGHTS>>
33

44
#### Included in this release
55
* QEMU `<<QEMU_VERSION>>` (this one includes 9pfs on Windows hosts patches and UEFI pflash fixes, if this functionality is not needed, then consider using official installer)
@@ -26,3 +26,6 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercon
2626
```
2727
<<SHA512>>
2828
```
29+
30+
#### Build log
31+
Build log is available for 90 days at <<BUILD_LOG_URL>>

0 commit comments

Comments
 (0)
Please sign in to comment.