Skip to content

Commit

Permalink
Created a release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
m3ta4 committed Sep 11, 2024
1 parent d6e19d7 commit 821ae7a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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

0 comments on commit 821ae7a

Please sign in to comment.