Skip to content

Change version to 1.2.0-beta4 #38

Change version to 1.2.0-beta4

Change version to 1.2.0-beta4 #38

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+'
- '*-preview[0-9]+'
jobs:
create_release:
name: Create Release
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Version
run: |
TAG="${{github.ref_name}}"
if [[ $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
else
echo "VERSION=${TAG}" >> $GITHUB_ENV
fi
if [[ $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "PRERELEASE=false" >> $GITHUB_ENV
else
echo "PRERELEASE=true" >> $GITHUB_ENV
fi
if [[ $TAG =~ -preview[0-9]+$ ]]; then
echo "PREVIEW=true" >> $GITHUB_ENV
else
echo "PREVIEW=false" >> $GITHUB_ENV
fi
- name: Check Tag Matches Version
run: |
VER="`cat version`"
if [ "${{env.VERSION}}" != "$VER" ]; then
echo "Error: Tag version (${{env.VERSION}}) doesn't match version file ($VER)."
exit 1
fi
- name: Build Package
uses: ./.github/actions/build
with:
cache-auth-token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Extract Config Signature
run: cat src/conf/confparser.h | sed -n 's/^#define .\+_SIGNATURE\W\+\([0-9]*\)/\1/p' > config_signature.txt
- name: Rename Package File
run: mv refloat.vescpkg refloat-${{env.VERSION}}.vescpkg
- name: Install Changelog Generation Dependencies
run: sudo apt-get install python3-git
- name: Generate Release Notes
run: |
if [[ "${{env.PREVIEW}}" == "true" ]]; then
echo "**WARNING: This is an experimental version of the package. Bugs may and will be present. Be very careful!**" > release_notes.md
echo "" >> release_notes.md
fi
python changelog.py >> release_notes.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{github.ref}}
name: Refloat ${{env.VERSION}}
draft: true
artifacts: "refloat-${{env.VERSION}}.vescpkg,config_signature.txt"
bodyFile: "release_notes.md"
prerelease: ${{env.PRERELEASE}}
allowUpdates: true