Skip to content

using mathieudutour for releases on release workflow - fix #2 #29

using mathieudutour for releases on release workflow - fix #2

using mathieudutour for releases on release workflow - fix #2 #29

Workflow file for this run

name: Create Tag and Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Allow pushing the tag
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Bump version and tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1 # More robust tag/release action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch # Start with patch, customizable with inputs
- name: Push new tag
run: |
git fetch --tags
git push origin ${{ steps.tag_version.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1 # Alternative release action
with:
body: Automated release for tag ${{ steps.tag_version.outputs.new_tag }}
files: | # Optionally attach release artifacts (e.g., binaries)
path/to/your/artifacts/*
prerelease: ${{ steps.tag_version.outputs.tag == 'pre' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}