Skip to content

Publish tagged QCW release #15

Publish tagged QCW release

Publish tagged QCW release #15

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_XXX: ${{ join(needs.call-prepare-docker.outputs.*) }}
# DOCKER_COMPOSE_VERSION_XXX: ${{ needs.call-prepare-docker.outputs.* }}
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
echo "$DOCKER_VERSION_XXX"
echo "$DOCKER_COMPOSE_VERSION_XXX"
# - 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"