mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-06-10 17:05:22 +02:00
ci: add version checking to publish-release.yml. close #1128
This commit is contained in:
parent
f03d830c30
commit
07f6205294
23
.github/workflows/publish-release.yml
vendored
23
.github/workflows/publish-release.yml
vendored
|
@ -12,7 +12,28 @@ on:
|
|||
required: true
|
||||
|
||||
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:
|
||||
needs: [version-check]
|
||||
name: "Draft Release 📥️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
@ -57,6 +78,7 @@ jobs:
|
|||
gh release edit "${{ github.ref }}" --draft=false
|
||||
|
||||
publish-flakehub:
|
||||
needs: [version-check]
|
||||
name: "Publish FlakeHub ❄️"
|
||||
runs-on: "ubuntu-22.04"
|
||||
permissions:
|
||||
|
@ -75,6 +97,7 @@ jobs:
|
|||
tag: "${{ inputs.tag }}"
|
||||
|
||||
publish-ppa:
|
||||
needs: [version-check]
|
||||
name: "Publish PPA 📦️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
|
Loading…
Reference in New Issue
Block a user