-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.3 KB
/
app-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
name: Publish application
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ['windows']
include:
- kind: windows
os: windows-latest
target: win-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Build
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="cf-java-gpu-fix-$tag"
# Build everything
dotnet publish cf-java-gpu-fix/cf-java-gpu-fix.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name" --self-contained
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "cf-java-gpu-fix-*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}