Skip to content

Commit

Permalink
Create a GitHub release when there is a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Dec 26, 2020
1 parent fd099be commit 678befe
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release 🚀

on:
push:
tags:
- 'final-*_*_*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:

- name: Prepare release names
run: |
VERSION_CHANGELOG=$(echo ${{ github.ref }} | cut -d '-' -f 2 | cut -d '_' -f1,2 | sed 's/_/\./g')
echo "version_url=https://changelog.qgis.org/en/qgis/version/${VERSION_CHANGELOG}" >> $GITHUB_ENV
VERSION_NAME=$(echo ${{ github.ref }} | cut -d '-' -f 2 | sed 's/_/\./g')
echo "version_name=${VERSION_NAME}" >> $GITHUB_ENV
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.version_name }}
body: ${{ env.version_url }}
draft: false
prerelease: false

0 comments on commit 678befe

Please sign in to comment.