Skip to content

0.22.6

0.22.6 #100

Workflow file for this run

name: release-tag
on:
pull_request:
types:
- closed
branches:
- master
permissions:
contents: read
jobs:
classify:
name: Classify pull request
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
release: ${{ steps.classify.outputs.release }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.event.pull_request.base.ref }}
persist-credentials: false
- name: Classify pull request
id: classify
uses: ./.github/actions/classify-pr
push-tag:
runs-on: ubuntu-latest
needs: [ classify ]
if: github.event.pull_request.merged == true && needs.classify.outputs.release == 'true'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
persist-credentials: false
- name: Read version.json
id: version
run: |
is_snapshot=$(jq -r '.isSnapshot' version.json)
if [ "$is_snapshot" = "true" ]; then
echo "::error::Snapshot versions cannot be released"
exit 1
fi
version=$(
jq -r '
"\(.majorVersion).\(.minorVersion).\(.patchVersion)"
+ (if (.suffix // "") != "" then "-\(.suffix)" else "" end)
' version.json
)
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Push tag
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
env:
GITHUB_TOKEN: ${{ secrets.PAT_AUTOTAG }}
CUSTOM_TAG: ${{ steps.version.outputs.version }}
WITH_V: false
PRERELEASE: false