-
Notifications
You must be signed in to change notification settings - Fork 23
57 lines (46 loc) · 1.67 KB
/
release-win.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release Windows
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Check version
run: |
$TAG = "${{ github.ref_name }}"
$PROPERTIES_PATH = "gradle.properties"
$APP_VERSION = (Select-String -Path $PROPERTIES_PATH -Pattern "^app\.version=" | ForEach-Object { $_.ToString().Split("=")[1] }).Trim()
if ($TAG -ne $APP_VERSION) {
Write-Output "Tag $TAG does not match app version $APP_VERSION"
exit 1
}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: createDistributable
- name: Zip
run: |
$VERSION="${{ github.ref_name }}"
echo $VERSION
Compress-Archive ./build/compose/binaries/main/app/vLabeler/* ./vlabeler-$VERSION-win64.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: vlabeler-${{ github.ref_name }}-win64.zip