Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/tag-pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tag pkg

on:
workflow_dispatch:
inputs:
version:
description: "pkg version to tag (e.g. v1.2.2)"
required: true
type: string

permissions:
contents: write

jobs:
tag:
name: Create pkg tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: develop
fetch-depth: 0

- name: Create and push pkg tag
run: |
VERSION="${{ inputs.version }}"
if ! [[ "$VERSION" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
echo "Error: version '$VERSION' does not match semver format (e.g. v1.2.2)"
exit 1
fi
TAG="pkg/$VERSION"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Error: tag '$TAG' already exists"
exit 1
fi
git tag "$TAG"
git push origin "$TAG"
Loading