-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (44 loc) · 1.37 KB
/
release.yml
File metadata and controls
50 lines (44 loc) · 1.37 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Upload new release
on:
workflow_dispatch:
inputs:
tag:
description: Version to use for release tag
required: true
commit:
description: Commit to use for tag
required: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
env:
INPUT_COMMIT: ${{ github.event.inputs.commit }}
steps:
- name: Checkout HEAD
uses: actions/checkout@v6
- name: Determine commit
id: determine-commit
run: |
if [[ ${INPUT_COMMIT} != '' ]]; then
echo "commit=${{ github.event.inputs.commit }}" >> "$GITHUB_OUTPUT"
else
echo "commit=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
fi
- name: Create new tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
default_bump: false
default_prerelease_bump: false
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.inputs.tag }}
commit_sha: ${{ needs.determine-commit.outputs.commit }}
tag_prefix: ""
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}