Skip to content

docs-actions 1.0.0

docs-actions 1.0.0 #2

name: create-major-tag
on:
release:
types:
- published
permissions:
contents: write
jobs:
create-major-tag:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: Get major version
run: |
MAJOR_VERSION=$(echo "${GITHUB_REF#refs/tags/v}" | awk -F. '{print $1}')
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> "${GITHUB_ENV}"
- name: Create major tag
run: |
git tag "v${MAJOR_VERSION}"
git push -f origin "refs/tags/v${MAJOR_VERSION}"