fix release #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
# tags in the form A.B.C where A B and C are only numbers. It won't trigger for pre-release tags. | |
- '[0-9]+.[0-9]+.[0-9]+' | |
name: Create Release | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get version from tag | |
id: tag_name | |
run: | | |
echo "current_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Changelog Entry | |
id: changelog_reader | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: ${{ steps.tag_name.outputs.current_version }} | |
path: ./CHANGELOG.md | |
- name: Create/update release | |
uses: ncipollo/release-action@v1 | |
with: | |
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object. | |
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
tag: ${{ steps.changelog_reader.outputs.version }} | |
name: Release ${{ steps.changelog_reader.outputs.version }} | |
body: ${{ steps.changelog_reader.outputs.changes }} | |
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} | |
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} | |
allowUpdates: true | |
token: ${{ secrets.GITHUB_TOKEN }} |