chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 (#137) #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update major tag | |
| on: | |
| # `release: published` is suppressed when the release is published by the default GITHUB_TOKEN — publish releases as a human (or PAT), never via GITHUB_TOKEN, or v8 silently lags behind. | |
| release: | |
| types: | |
| - published | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Semver tag to align the major tag to (e.g. v8.3.8)" | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-major-tag: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.release.prerelease == false }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract major version | |
| id: version | |
| run: | | |
| TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name || github.ref_name }}" | |
| echo "Resolved tag: $TAG_NAME" | |
| if [[ ! "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| echo "::notice::'$TAG_NAME' is not a release semver tag (vX.Y.Z); skipping major-tag update." | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| MAJOR_VERSION="$(echo "$TAG_NAME" | sed -E 's/^v([0-9]+)\..*/v\1/')" | |
| echo "major_version=$MAJOR_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "full_version=$TAG_NAME" >> "$GITHUB_OUTPUT" | |
| - name: Update major version tag | |
| if: ${{ steps.version.outputs.skip != 'true' }} | |
| run: | | |
| git config user.name "parcellab-dev-bot" | |
| git config user.email "dev.bot@parcellab.com" | |
| git tag -f "${{ steps.version.outputs.major_version }}" "${{ steps.version.outputs.full_version }}" | |
| git push origin -f "refs/tags/${{ steps.version.outputs.major_version }}" |