Skip to content

Updating version

Updating version #3

Workflow file for this run

name: Create release and pre-release on VERSION change
on:
push:
branches:
- main
- release
paths:
- 'VERSION'
jobs:
create-release:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version
id: get-version
run: |
VERSION_CONTENT=$(cat VERSION)
echo "::set-output name=version::$VERSION_CONTENT"
if [[ $VERSION_CONTENT == *"-alpha"* ]]; then
echo "::set-output name=prerelease::true"
else
echo "::set-output name=prerelease::false"
fi
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: Release ${{ steps.get-version.outputs.version }}
draft: false
prerelease: ${{ steps.get-version.outputs.prerelease }}