-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.6 KB
/
release-publish.yaml
File metadata and controls
54 lines (51 loc) · 1.6 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
51
52
53
54
# This file is @generated by <https://github.com/liblaf/copier-release>.
# DO NOT EDIT!
name: Release / Publish
on:
pull_request:
branches:
- main
types:
- closed
jobs:
release-draft:
name: Create Release
permissions:
contents: write
if: >-
startsWith(github.head_ref, 'release-please/') &&
github.event.pull_request.merged
runs-on: ubuntu-latest
environment:
name: release-please
deployment: false
steps:
- id: auth
name: Auth
uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ steps.auth.outputs.token }}
- id: version
name: Get version
run: |-
tag="$(awk '{ print $NF }' <<< "$TITLE")"
version="${tag#'v'}"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "version=$version" >> "$GITHUB_OUTPUT"
env:
TITLE: ${{ github.event.pull_request.title }}
- name: Create tag
run: |-
git tag '${{ steps.version.outputs.tag }}'
git push origin tag '${{ steps.version.outputs.tag }}'
- name: Create release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
with:
body: ${{ github.event.pull_request.body }}
tag_name: ${{ steps.version.outputs.tag }}
token: ${{ steps.auth.outputs.token }}