Skip to content

Commit

Permalink
Workflow to create release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Sep 9, 2022
1 parent e8d7b8d commit a002ea8
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

name: Create Release
on:
push:
tags:
- 'v[0-9]*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set Version
run: |
ver="$(echo ${{ github.ref_name }} | sed -e 's/^v//')"
echo "ver=${ver}" >> $GITHUB_ENV
- name: Parse Changes
run: |
sed \
-e '/./,$!d' \
-e '/^$/,$d' \
-e 's/^\t/ /' \
-e '3 s/^.*$/### Changes:/' \
changelog.txt | tail -n+2 > release_notes.tmp
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: 'Version ${{ env.ver }}'
body_path: release_notes.tmp

0 comments on commit a002ea8

Please sign in to comment.