-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.11 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (41 loc) · 1.11 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
name: release
on:
push:
tags: [ 'v*' ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rid: [ win-x64, linux-x64, osx-x64, osx-arm64 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Publish (${{ matrix.rid }})
run: >
dotnet publish IpWidget.csproj -c Release -r ${{ matrix.rid }}
--self-contained
-p:PublishSingleFile=true
-p:EnableCompressionInSingleFile=true
-o publish/${{ matrix.rid }}
- name: Archive
run: |
NAME="ipwidget-${{ github.ref_name }}-${{ matrix.rid }}"
cd publish/${{ matrix.rid }}
if [ "${{ matrix.rid }}" = "win-x64" ]; then
zip -r "../../$NAME.zip" .
else
tar -czf "../../$NAME.tar.gz" .
fi
- name: Attach to release
uses: softprops/action-gh-release@v2
with:
files: |
ipwidget-*.zip
ipwidget-*.tar.gz