ci: add version checking to publish-release.yml. close #1128
This commit is contained in:
parent
f03d830c30
commit
07f6205294
|
@ -12,7 +12,28 @@ on:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
version-check:
|
||||||
|
name: "Check versions ⚖️"
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: "Compare App and Git versions 🟰"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
APP_VERSION=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
|
||||||
|
GIT_VERSION=$(git describe --tags | cut -d'-' -f1)
|
||||||
|
echo "App version: ${REL_VERSION}"
|
||||||
|
echo "Git version: ${GIT_VERSION}"
|
||||||
|
if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then
|
||||||
|
echo "ERROR! Version mismatch.";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
draft-release:
|
draft-release:
|
||||||
|
needs: [version-check]
|
||||||
name: "Draft Release 📥️"
|
name: "Draft Release 📥️"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -57,6 +78,7 @@ jobs:
|
||||||
gh release edit "${{ github.ref }}" --draft=false
|
gh release edit "${{ github.ref }}" --draft=false
|
||||||
|
|
||||||
publish-flakehub:
|
publish-flakehub:
|
||||||
|
needs: [version-check]
|
||||||
name: "Publish FlakeHub ❄️"
|
name: "Publish FlakeHub ❄️"
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -75,6 +97,7 @@ jobs:
|
||||||
tag: "${{ inputs.tag }}"
|
tag: "${{ inputs.tag }}"
|
||||||
|
|
||||||
publish-ppa:
|
publish-ppa:
|
||||||
|
needs: [version-check]
|
||||||
name: "Publish PPA 📦️"
|
name: "Publish PPA 📦️"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in New Issue