Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Publish GitHub release on tag push
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Nov 28, 2023
1 parent ebe430f commit 8334e45
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: ['*.*.*']

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Is this a prerelease?
run: |
PRERELEASE=false
# Check release type
if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' || $GITHUB_REF_NAME =~ 'rc' ]]; then
echo "This is a prerelease."
PRERELEASE=true
fi
echo "is_prerelease=$PRERELEASE" >> $GITHUB_ENV
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref_name }}
body: Please refer to [Changelog.md](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/Changelog.md) for details.
draft: false
prerelease: ${{ env.is_prerelease }}

0 comments on commit 8334e45

Please sign in to comment.