Skip to content

Created a release workflow. #1

Created a release workflow.

Created a release workflow. #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update major.minor tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=$(git describe --tags --abbrev=0)
MAJOR_MINOR=$(echo $TAG_NAME | grep -oE 'v[0-9]+\.[0-9]+')
git tag -f $MAJOR_MINOR $TAG_NAME
git push origin -f $MAJOR_MINOR