Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arixmkii committed Dec 12, 2024
1 parent de7e572 commit 095ab0f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/prepare-docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
env:
CLI_GITURL: https://github.com/docker/cli.git
CLI_SHA: bde2b893136c1c7a2894386e4f8743089c89b041 # v27.4.0
CLI_VERSION: 27.4.0
COMPOSE_GITURL: https://github.com/docker/compose.git
COMPOSE_SHA: a8469db83f514a5abe4681c7fee773061f1941c6 # v2.31.0
COMPOSE_VERSION: 2.31.0

jobs:
build:
runs-on: ubuntu-latest
outputs:
cli_versions: ${{ steps.make_versions.outputs.cli }}
compose_versions: ${{ steps.make_versions.outputs.compose }}

steps:
- name: 🏗️ Install Docker Buildx
Expand Down Expand Up @@ -63,6 +68,12 @@ jobs:
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
cat sha.checksums
- id: make_versions
name: "📌 Export versions"
run: |
echo "cli=$CLI_VERSION" >> "$GITHUB_OUTPUT"
echo "compose=$COMPOSE_VERSION" >> "$GITHUB_OUTPUT"
- name: "🚀 Upload artifact"
uses: actions/upload-artifact@v4
Expand Down
37 changes: 27 additions & 10 deletions .github/workflows/publish-qcw-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ name: Publish tagged QCW release

on:
workflow_dispatch:
release_name:
description: 'Release name'
required: true
type: string
release_tag:
description: 'Release tag'
required: true
type: string
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

prepare:
publish:
needs: call-prepare-docker
runs-on: ubuntu-latest

Expand All @@ -34,8 +40,19 @@ jobs:
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: |
sed 's/<<TAG_NAME>>/${{ inputs.release_tag }}/g' release.template.md
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
Expand Down
2 changes: 1 addition & 1 deletion release.template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Highlights
TBD.
<<RELEASE_HIGHLIGHTS>>

#### Included in this release
* 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)
Expand Down

0 comments on commit 095ab0f

Please sign in to comment.