Skip to content

Commit

Permalink
add version check
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit authored Apr 15, 2024
1 parent fd2924d commit 703cef3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@ on:
tags: ['*']

jobs:
version-check:
runs-on: ubuntu-22.04
steps:
- name: Fetch repo
uses: actions/checkout@v4
#with:
#fetch-depth: 0

- name: Check if we are on correct commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REL_VERSION=v$(./quickemu --version)
GIT_VERSION=$(git describe --tags)
echo "Release version ${REL_VERSION}"
echo "Git tag version ${GIT_VERSION}"
if [ "${REL_VERSION}" != "${GIT_VERSION}" ]; then \
echo "This is probably not what you want"; \
exit 1; \
fi
create-release:
name: Create Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Create release ${{ github.ref }} as a draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }
run: |
gh release create "${{ github.ref }}" --draft --generate-notes
Expand Down

0 comments on commit 703cef3

Please sign in to comment.