tag-release #76
This file contains 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: tag-release | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'prep-release-**' | |
workflow_dispatch: | |
jobs: | |
## Tag a release (if the commit looks like one) | |
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@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
# Install deps | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-release | |
uses: taiki-e/install-action@v1 | |
with: | |
tool: just,cargo-get | |
- name: Create and push new tag | |
run: | | |
git tag v$(just print-version); | |
git push v$(just print-version); |