ci: added workflows #4
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
# This workflow will build and publish a new changelog. | |
# It is supposed to be run only when tag is pushed. | |
# Runs only for full releases: | |
# https://regex101.com/r/oZihYi/1 | |
name: Conventional changelog | |
on: | |
push: | |
tags: | |
- v* | |
permissions: write-all | |
jobs: | |
deploy: | |
name: Generate changelog and publish a release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if this is full release | |
id: check-tag | |
run: | | |
regex='^(v)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' | |
if echo ${{ github.ref_name }} | grep -qE $regex ; then | |
echo "match=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Checkout Code | |
if: steps.check-tag.outputs.match == 'true' | |
uses: actions/checkout@v3 | |
- name: Update CHANGELOG | |
id: changelog | |
if: steps.check-tag.outputs.match == 'true' | |
uses: requarks/changelog-action@v1 | |
with: | |
token: ${{ github.token }} | |
tag: ${{ github.ref_name }} | |
- name: Create Release | |
if: steps.check-tag.outputs.match == 'true' | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
draft: false | |
makeLatest: true | |
name: ${{ github.ref_name }} | |
body: ${{ steps.changelog.outputs.changes }} | |
token: ${{ github.token }} |