-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (77 loc) · 4.2 KB
/
create_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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: create release
on:
push:
branches: [ master ]
paths:
- "**/workflows-trigger.properties"
env:
PACKAGE_VERSION: 1.0.0
V_PACKAGE_VERSION: v1.0.0
jobs:
create-release-distribution:
strategy:
matrix:
os: [ windows-latest , ubuntu-latest , macos-13 , macos-14 ]
runs-on: ${{ matrix.os }}
name: create release distribution
steps:
- if: matrix.os != 'macos-14'
name: setup jdk
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "18"
architecture: x64
- if: matrix.os == 'macos-14'
name: setup jdk
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "18"
architecture: x64
- name: checkout
uses: actions/checkout@v4
- name: grant execute permission for gradlew
run: chmod +x gradlew
- name: packageReleaseDistributionForCurrentOS
run: ./gradlew packageReleaseDistributionForCurrentOS
- if: matrix.os == 'windows-latest'
name: rename File
run: |
mv ./build/compose/binaries/main-release/exe/compose-multiplatform-xlog-decode-${{env.PACKAGE_VERSION}}.exe ./build/compose/binaries/main-release/exe/compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-windows-x86-64.exe
- if: matrix.os == 'windows-latest'
name: zip AppImage
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: "compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-windows-x86-64.zip"
directory: "./build/compose/binaries/main-release/app/compose-multiplatform-xlog-decode"
- if: matrix.os == 'ubuntu-latest'
name: rename File
run: |
mv /home/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/rpm/compose-multiplatform-xlog-decode-${{env.PACKAGE_VERSION}}-1.x86_64.rpm /home/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/rpm/compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-linux-x86-64.rpm
mv /home/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/deb/compose-multiplatform-xlog-decode_${{env.PACKAGE_VERSION}}_amd64.deb /home/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/deb/compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-linux-amd64.deb
- if: matrix.os == 'macos-13'
name: rename File
run: |
mv /Users/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/dmg/compose-multiplatform-xlog-decode-${{env.PACKAGE_VERSION}}.dmg /Users/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/dmg/compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-macos-x86-64.dmg
- if: matrix.os == 'macos-14'
name: rename File
run: |
mv /Users/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/dmg/compose-multiplatform-xlog-decode-${{env.PACKAGE_VERSION}}.dmg /Users/runner/work/compose-multiplatform-xlog-decode/compose-multiplatform-xlog-decode/build/compose/binaries/main-release/dmg/compose-multiplatform-xlog-decode-${{env.V_PACKAGE_VERSION}}-macos-arm64.dmg
- name: get current time
id: currentTime
uses: josStorer/get-current-time@v2
with:
format: YYYY-MM-DD
- name: draft a new release
uses: ncipollo/release-action@v1
with:
token: ${{secrets.ACTION_TOKEN}}
allowUpdates: true
artifactErrorsFailBuild: false
generateReleaseNotes: false
artifacts: "**/exe/*.exe,**/app/compose-multiplatform-xlog-decode/*.zip,**/deb/*.deb,**/rpm/*.rpm,**/dmg/*.dmg"
body: "## ${{env.V_PACKAGE_VERSION}} / ${{steps.currentTime.outputs.formattedTime}}"
tag: "${{env.V_PACKAGE_VERSION}}"
name: "${{env.V_PACKAGE_VERSION}}"