-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 1.85 KB
/
release-please.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
65
66
67
68
69
70
71
72
73
74
75
76
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
env:
APP_NAME: WindowTool
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release Please
uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
release-type: simple
build-x64:
name: Build x64 Release
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build.yml
secrets: inherit
with:
platform: x64
configuration: Release
build-x86:
name: Build x86 Release
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build.yml
secrets: inherit
with:
platform: x86
configuration: Release
publish:
name: Publish Release
runs-on: ubuntu-latest
needs: [release,build-x64, build-x86]
if: ${{ needs.release.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: "*-artifact"
merge-multiple: false
- name: Zip Artifacts
run: |
mv x86-artifact x86
mv x64-artifact x64
zip -r "${{ env.APP_NAME }}-${{ needs.release.outputs.tag_name }}.zip" x86 x64 LICENSE
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release.outputs.tag_name }} "${{ env.APP_NAME }}-${{ needs.release.outputs.tag_name }}.zip"