Skip to content

v2.0.5

v2.0.5 #13

Workflow file for this run

name: Release
run-name: ${{ github.ref_name }}
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Check if latest version
id: latest
shell: bash
run: |
LATEST=$(git tag --list --sort=-v:refname | head -n1)
if [ "$GITHUB_REF_NAME" == "$LATEST" ]; then
echo "latest=true" | tee -a "$GITHUB_OUTPUT"
else
echo "latest=false" | tee -a "$GITHUB_OUTPUT"
fi
- name: Create GitHub Release
id: release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
with:
make_latest: ${{ steps.latest.outputs.latest }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
tags:
name: Update shared tags
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Update tags
shell: bash
run: |
MAJOR=$(cut -d '.' -f 1 <<< "$GITHUB_REF_NAME")
MINOR=$(cut -d '.' -f 2 <<< "$GITHUB_REF_NAME")
cat <<EOF
VERSION=$GITHUB_REF_NAME
MAJOR=$MAJOR
MINOR=$MINOR
EOF
git tag -f "$MAJOR.$MINOR" "$GITHUB_SHA"
git tag -f "$MAJOR" "$GITHUB_SHA"
git push -u origin -f "$MAJOR.$MINOR"
git push -u origin -f "$MAJOR"
git show-ref --tags | grep "$GITHUB_SHA"