summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yaml
blob: f3eb8df4b3e4f5437c57dd3e010e0a951a143ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release

on:
  push:
    tags: ["v*.*.*"]
  workflow_dispatch:
    inputs:
      tag:
        description: "Existing tag to draft a release for"
        required: true

jobs:
  release:
    name: Create release

    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

      - name: Run `gh`
        env:
          GH_TOKEN: ${{ github.token }}
          TAG: ${{ inputs.tag || github.ref_name }}
        run: |
          gh release create \
            --draft \
            --notes-from-tag \
            --verify-tag \
            "$TAG"