-
Notifications
You must be signed in to change notification settings - Fork 31
60 lines (50 loc) · 1.6 KB
/
Release.yml
File metadata and controls
60 lines (50 loc) · 1.6 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
name: Release
on:
push:
tags:
- "*"
defaults:
run:
shell: bash
jobs:
Publish:
runs-on: ubuntu-latest
permissions:
contents: write
env:
targets: linux-x64 linux-arm64 linux-arm osx-x64 osx-arm64 win-x64 win-arm64
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.ref }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Run tests
run: dotnet test
- name: Publish binaries
run: |
for target in $targets
do
dotnet publish src -c Release -r $target -o publish/$target -p:PublishTrimmed=true,PublishReadyToRun=true,PublishReadyToRunComposite=true,PublishSingleFile=true,TieredCompilation=false
done
- name: Create release files
working-directory: publish
run: |
for target in $targets
do
cd $target
zip -9 ../LoadTestToolbox_$(echo ${{ github.ref }} | sed 's/refs\/tags\///')_$target.zip *
cd ..
done
- name: Create release
uses: softprops/action-gh-release@v2.5.0
with:
files: publish/LoadTestToolbox_*.zip
- name: Build NuGet Package
run: dotnet pack -c Release -p:ContinuousIntegrationBuild=true
- name: Push NuGet Package
run: dotnet nuget push src/bin/Release/LoadTestToolbox.$(echo ${{ github.ref }} | sed 's/refs\/tags\///').nupkg -k $NUGET_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}