Skip to content

tag-release

tag-release #92

Workflow file for this run

name: tag-release
on:
pull_request:
types:
- closed
branches:
- 'prep-release-v**'
workflow_dispatch:
inputs:
ref:
description: |
Github ref (e.x. 'branch', 'tag-v1.0.0', '<long SHA>')
required: false
default: ''
type: string
jobs:
## Tag a release
tag-release:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged }}
permissions:
contents: write
steps:
# Checkout the repository
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_PR_PAT }}
fetch-depth: 0
ref: ${{ github.event.inputs.ref || github.event.pull_request.head.ref }}
# Install deps
- uses: Swatinem/rust-cache@v2
- uses: cargo-bins/cargo-binstall@main
- name: install cargo deps
run: |
cargo binstall -y --locked just cargo-get
- name: Create and push new tag
run: |
git tag v$(just print-version);
git push https://${{ secrets.RELEASE_PR_PAT }}@github.com/VADOSWARE/pg_idkit.git --tags;