Skip to content

Merge pull request #3 from alhankeser/feature/releases #2

Merge pull request #3 from alhankeser/feature/releases

Merge pull request #3 from alhankeser/feature/releases #2

Workflow file for this run

name: Release Latest Version
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Release new version
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- name: Get major version
id: major_version
run: |
echo "major_version=$(echo ${{ steps.tag_version.outputs.new_tag }} | cut -d. -f1)" >> $GITHUB_OUTPUT
- name: Retag
run: |
git tag -f latest || true
git tag -f ${{ steps.major_version.outputs.major_version }} || true
git push -f --tags || true