-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.1 KB
/
Copy pathrelease-packages.yml
File metadata and controls
71 lines (62 loc) · 2.1 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
name: Release Packages
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
APP_NAME: TouchSenderTablet
APP_PROJECT: TouchSenderTablet.GUI
jobs:
release-packages:
permissions:
contents: write
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set VERSION variable from tag
shell: bash
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Set archive name
shell: bash
run: |
echo "app_x64_framework_name=${{ env.APP_NAME }}_win-x64_framework-dependent_${{ env.VERSION }}" >> $GITHUB_ENV
echo "app_x64_self_name=${{ env.APP_NAME }}_win-x64_${{ env.VERSION }}" >> $GITHUB_ENV
- name: dotnet publish x64 Framework-dependent
run: >
dotnet publish ${{ env.APP_PROJECT}}
-c Release
-r win-x64
-p:Platform=x64
--self-contained false
-p:PublishSingleFile=true
-p:PublishReadyToRun=true
-p:DebugType=none
-p:Version=${{ env.VERSION }}
-o publish\${{ env.app_x64_framework_name }}
- name: dotnet publish x64 Self-contained
run: >
dotnet publish ${{ env.APP_PROJECT}}
-c Release
-r win-x64
-p:Platform=x64
--self-contained true
-p:PublishSingleFile=true
-p:PublishReadyToRun=true
-p:DebugType=none
-p:Version=${{ env.VERSION }}
-o publish\${{ env.app_x64_self_name }}
# Create zip
- name: Create zip archive
shell: pwsh
run: |
Compress-Archive -Path publish\${{ env.app_x64_framework_name }}\* -DestinationPath ${{ env.app_x64_framework_name }}.zip
Compress-Archive -Path publish\${{ env.app_x64_self_name }}\* -DestinationPath ${{ env.app_x64_self_name }}.zip
- name: Upload release artifacts
run: gh release upload "${{ github.ref_name }}" *.zip --clobber
# for using wildcards
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}