Static interface method support #58
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
name: Release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Read version from Git ref | |
id: version | |
shell: pwsh | |
run: echo "version=$(if ($env:GITHUB_REF.StartsWith('refs/tags/v')) { $env:GITHUB_REF -replace '^refs/tags/v', '' } else { 'next' })" >> $env:GITHUB_OUTPUT | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Read the changelog | |
uses: ForNeVeR/ChangelogAutomation.action@v2 | |
with: | |
input: ./CHANGELOG.md | |
output: ./changelog-section.md | |
- if: startsWith(github.ref, 'refs/tags/v') | |
name: Create a release | |
shell: pwsh | |
run: gh release create --title $env:TITLE --notes-file $env:RELEASE_NOTES_FILE $env:VERSION_TAG | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TITLE: 'Refasmer v${{ steps.version.outputs.version }}' | |
RELEASE_NOTES_FILE: './changelog-section.md' | |
VERSION_TAG: 'v${{ steps.version.outputs.version }}' |