Skip to content

fix: Granting release workflow write permissions #2

fix: Granting release workflow write permissions

fix: Granting release workflow write permissions #2

Workflow file for this run

name: Release Action
on:
push:
branches:
- main
jobs:
release:
name: Create Action Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Bump version tag
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ github.token }}
commit_sha: ${{ github.sha }}
- name: Update MAJOR and MINOR tags
shell: bash
env:
VERSION: ${{ steps.tag.outputs.new_version }}
run: |
MAJOR=$(echo "$VERSION" | cut -d . -f 1)
MINOR=$(echo "$VERSION" | cut -d . -f 2)
git tag -f v$MAJOR
git tag -f v$MAJOR.$MINOR
git push -f -u origin v$MAJOR
git push -f -u origin v$MAJOR.$MINOR