Create release.yml

This commit is contained in:
Whispering Wind
2024-12-18 19:02:43 +03:30
committed by GitHub
parent 26b299bcb9
commit bd26e2ac9b

38
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Create Release on Version Change
on:
push:
paths:
- 'VERSION'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read version from VERSION file
run: |
version=$(cat VERSION)
echo "version=${version}" >> $GITHUB_OUTPUT
id: get_version
- name: Read changelog for release description
run: |
changelog=$(cat changelog)
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$changelog" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
id: get_changelog
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
name: "${{ steps.get_version.outputs.version }}"
body: ${{ steps.get_changelog.outputs.changelog }}
draft: false
prerelease: false