-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (67 loc) · 2.38 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
workflow_dispatch:
push:
tags: '*'
jobs:
Build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux-x64
- os: ubuntu-latest
platform: linux-musl-x64
- os: ubuntu-latest
platform: linux-arm64
- os: windows-latest
platform: win-x64
- os: windows-latest
platform: win-arm64
- os: macos-latest
platform: osx-x64
- os: macos-latest
platform: osx-arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install ARM Toolchain
if: ${{ matrix.platform == 'linux-arm64' }}
run: |
sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
EOF'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Publish
run: dotnet publish -r ${{ matrix.platform }} --self-contained
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: 'src/ReportPortal.GaugePlugin/bin/Release/net8.0/${{matrix.platform}}/*.zip'
compression-level: 0
Release:
environment:
name: GitHub Releases
url: https://github.com/reportportal/agent-net-gauge/releases
needs: Build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Upload GitHub Release
run: gh release upload ${{ github.ref_name }} ./**/*.zip --clobber --repo reportportal/agent-net-gauge
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}