-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (57 loc) · 1.79 KB
/
release.yml
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
55
56
57
58
59
60
61
62
63
64
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
get-release-version:
runs-on: ubuntu-latest
outputs:
rv: ${{ steps.get.outputs.version }}
steps:
- name: Get release version from tag
id: get
shell: bash
run: |
version="${GITHUB_REF#refs/tags/}"
echo "version=${version}" >> $GITHUB_OUTPUT
echo "rhai-dylib release version=${version}"
changelog:
runs-on: ubuntu-latest
needs: [get-release-version]
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
args: --latest --verbose --tag ${{ needs.get-release-version.outputs.rv }}
publish-github:
needs: changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Sign the release
# shell: bash
# run: |
# echo "${{ secrets.GPG_RELEASE_KEY }}" | base64 --decode > private.key
# echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --pinentry-mode=loopback \
# --passphrase-fd 0 --import private.key
# echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --pinentry-mode=loopback \
# --passphrase-fd 0 --detach-sign \
# linuxwave-${{ env.RELEASE_VERSION }}-${{ matrix.build.TARGET }}.tar.gz
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
body: ${{ needs.changelog.outputs.release_body }}
tag_name: ${{ needs.get-release-version.outputs.rv }}
token: ${{ secrets.GITHUB_TOKEN }}