Skip to content

Merge pull request #23 from reload/dependabot/github_actions/anothrNi… #9

Merge pull request #23 from reload/dependabot/github_actions/anothrNi…

Merge pull request #23 from reload/dependabot/github_actions/anothrNi… #9

Workflow file for this run

name: Release
on:
push:
branches: main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.70.0
id: version
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Major version tag
id: major-version
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: actions/github-script@v7
with:
script: |
core.setOutput('tag', '${{ steps.version.outputs.new_tag }}'.split('.')[0])
- name: Tag major version ${{ steps.major-version.outputs.tag }}
if: ${{ (steps.version.outputs.new_tag != '') }}
run: |
git tag --force ${{ steps.major-version.outputs.tag }}
git push origin ${{ steps.major-version.outputs.tag }} --force
- name: Create/update major version release
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.PAT_TOKEN }}
allowUpdates: true
generateReleaseNotes: true
tag: ${{ steps.major-version.outputs.tag }}
name: ${{ steps.major-version.outputs.tag }} (${{ steps.version.outputs.new_tag }})
- name: Create release ${{ steps.version.outputs.new_tag }}
if: ${{ (steps.version.outputs.new_tag != '') }}
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.PAT_TOKEN }}
generateReleaseNotes: true
tag: ${{ steps.version.outputs.new_tag }}
name: Release ${{ steps.version.outputs.new_tag }}