diff --git a/.github/workflows/prepare-docker-release.yml b/.github/workflows/prepare-docker-release.yml index 0717cdf..46727a2 100644 --- a/.github/workflows/prepare-docker-release.yml +++ b/.github/workflows/prepare-docker-release.yml @@ -3,16 +3,28 @@ name: Prepare QCW Docker (from revision) on: workflow_dispatch: workflow_call: + outputs: + cli_version: + description: "Docker CLI version" + value: ${{ jobs.build.outputs.cli_version }} + compose_version: + description: "Docker Compose version" + value: ${{ jobs.build.outputs.compose_version }} 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_version: ${{ steps.make_versions.outputs.cli }} + compose_version: ${{ steps.make_versions.outputs.compose }} steps: - name: 🏗️ Install Docker Buildx @@ -63,6 +75,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 diff --git a/.github/workflows/prepare-podman-release.yml b/.github/workflows/prepare-podman-release.yml index 2c2e685..682699f 100644 --- a/.github/workflows/prepare-podman-release.yml +++ b/.github/workflows/prepare-podman-release.yml @@ -1,15 +1,24 @@ name: Prepare QCW Podman (from revision) -on: workflow_dispatch +on: + workflow_dispatch: + workflow_call: + outputs: + podman_version: + description: Podman version" + value: ${{ jobs.build.outputs.podman_version }} env: PODMAN_GITURL: https://github.com/containers/podman.git PODMAN_SHA: 4cbdfde5d862dcdbe450c0f1d76ad75360f67a3c # v5.3.1 + PODMAN_VERSION: 5.3.1 PODMAN_REVISION_KIND: prod # prod|dev jobs: build: runs-on: windows-latest + outputs: + podman_version: ${{ steps.make_versions.outputs.podman }} steps: - name: "🏗️ Install msys2" @@ -102,6 +111,12 @@ jobs: find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums cat sha.checksums + - id: make_versions + name: "📌 Export versions" + shell: msys2 {0} + run: | + echo "podman=$PODMAN_VERSION" >> "$GITHUB_OUTPUT" + - name: "🚀 Upload artifact" uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/prepare-qemu-release.yml b/.github/workflows/prepare-qemu-release.yml index 3408d4c..6f9f0e3 100644 --- a/.github/workflows/prepare-qemu-release.yml +++ b/.github/workflows/prepare-qemu-release.yml @@ -1,6 +1,12 @@ name: Prepare QCW QEMU (from TarBall sources) -on: workflow_dispatch +on: + workflow_dispatch: + workflow_call: + outputs: + qemu_version: + description: QEMU version" + value: ${{ jobs.build.outputs.qemu_version }} env: QEMU_VERSION: 9.2.0 @@ -9,6 +15,8 @@ env: jobs: build: runs-on: windows-latest + outputs: + qemu_version: ${{ steps.make_versions.outputs.qemu }} steps: - name: "🏗️ Install msys2" @@ -113,6 +121,12 @@ jobs: find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums cat sha.checksums + - id: make_versions + name: "📌 Export versions" + shell: msys2 {0} + run: | + echo "qemu=$QEMU_VERSION" >> "$GITHUB_OUTPUT" + - name: "🚀 Upload artifact" uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/publish-qcw-release.yml b/.github/workflows/publish-qcw-release.yml index f5ae54b..f3c4ff3 100644 --- a/.github/workflows/publish-qcw-release.yml +++ b/.github/workflows/publish-qcw-release.yml @@ -2,21 +2,33 @@ 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: - needs: call-prepare-docker + call-prepare-podman: + uses: ./.github/workflows/prepare-podman-release.yml + + call-prepare-qemu: + uses: ./.github/workflows/prepare-qemu-release.yml + + publish: + needs: [call-prepare-docker, call-prepare-podman, call-prepare-qemu] runs-on: ubuntu-latest steps: @@ -34,8 +46,26 @@ jobs: path: qcw - name: "🗒️ Prepare release notes" + env: + DOCKER_VERSION: ${{ needs.call-prepare-docker.outputs.cli_version }} + DOCKER_COMPOSE_VERSION: ${{ needs.call-prepare-docker.outputs.compose_version }} + PODMAN_VERSION: ${{ needs.call-prepare-podman.outputs.podman_version }} + QEMU_VERSION: ${{ needs.call-prepare-qemu.outputs.qemu_version }} + BUILD_LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | - sed 's/<>/${{ 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/<>/$(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/<>/$(tail -n $ARTSIZE2 sha.sums | sort -k 2 | sed -z 's:\n:\\n:g' | sed 's:/:\\/:g')/g" -i release.template.md + sed 's/<>/${{ inputs.release_tag }}/g' -i release.template.md + sed 's/<>/${{ inputs.release_highlights }}/g' -i release.template.md + sed "s/<>/$DOCKER_VERSION/g" -i release.template.md + sed "s/<>/$DOCKER_COMPOSE_VERSION/g" -i release.template.md + sed "s/<>/$PODMAN_VERSION/g" -i release.template.md + sed "s/<>/$QEMU_VERSION/g" -i release.template.md + sed -e "s/<>/$(echo $BUILD_LOG_URL | sed 's:/:\\/:g')/g" -i release.template.md + cat release.template.md - name: "🏷️ Publish release" uses: ncipollo/release-action@v1 @@ -45,4 +75,4 @@ jobs: artifacts: "qcw/**/*.exe" bodyFile: "release.template.md" tag: ${{ inputs.release_tag }} - commit: "update-workflows" + commit: "main" diff --git a/release.template.md b/release.template.md index 272648b..5d17717 100644 --- a/release.template.md +++ b/release.template.md @@ -1,5 +1,5 @@ ### Highlights -TBD. +<> #### Included in this release * QEMU `<>` (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 ``` <> ``` + +#### Build log +Build log is available for 90 days at <>