-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (101 loc) · 3.9 KB
/
Copy pathrelease.yml
File metadata and controls
116 lines (101 loc) · 3.9 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build and Release
on:
push:
branches:
- master
permissions:
contents: write
packages: write
jobs:
build:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
# os: [windows-latest, ubuntu-latest] # Commented out Linux/Ubuntu/Debian until platform testing is finalized
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Unit Tests
run: ./gradlew check
- name: Build Release Distribution
run: ./gradlew :apps:desktopApp:packageDistributionForCurrentOS :apps:desktopApp:packageUberJarForCurrentOS :apps:desktopApp:packagePortableZip :apps:cliApp:distZip :apps:cliApp:distTar
- name: Publish Plugin API
run: ./gradlew :plugin-api:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: |
apps/desktopApp/build/compose/binaries/main/msi/*.msi
apps/desktopApp/build/compose/binaries/main/exe/*.exe
apps/desktopApp/build/compose/binaries/main/dmg/*.dmg
apps/desktopApp/build/compose/binaries/main/deb/*.deb
apps/desktopApp/build/compose/binaries/main/pkg/*.pkg
apps/desktopApp/build/compose/binaries/main/appimage/*.AppImage
apps/desktopApp/build/compose/binaries/main-release/msi/*.msi
apps/desktopApp/build/compose/binaries/main-release/exe/*.exe
apps/desktopApp/build/compose/binaries/main-release/dmg/*.dmg
apps/desktopApp/build/compose/binaries/main-release/deb/*.deb
apps/desktopApp/build/compose/binaries/main-release/pkg/*.pkg
apps/desktopApp/build/compose/binaries/main-release/appimage/*.AppImage
apps/desktopApp/build/compose/binaries/main/portable/*.zip
apps/desktopApp/build/compose/jars/*.jar
apps/cliApp/build/distributions/*.zip
apps/cliApp/build/distributions/*.tar
apps/cliApp/build/distributions/*.tar.gz
if-no-files-found: warn
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: all-artifacts
- name: Get Version
id: get_version
run: |
# Read version from libs.versions.toml using a simple grep/sed
VERSION=$(grep 'app =' gradle/libs.versions.toml | cut -d'"' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Extract Changelog
run: |
python scripts/extract_changelog.py ${{ env.VERSION }} shared/gui/src/commonMain/composeResources/files/CHANGELOG.md --output release_notes.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
body_path: release_notes.md
draft: false
prerelease: false
fail_on_unmatched_files: false
files: |
all-artifacts/**/*.msi
all-artifacts/**/*.exe
all-artifacts/**/*.dmg
all-artifacts/**/*.deb
all-artifacts/**/*.pkg
all-artifacts/**/*.jar
all-artifacts/**/*.zip
all-artifacts/**/*.AppImage
all-artifacts/**/*.tar
all-artifacts/**/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}