-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (54 loc) · 1.74 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (54 loc) · 1.74 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
72
# Copyright 2024-2025 The MathWorks, Inc.
name: Release Artifacts
on:
release:
types: [created]
env:
go_version: 1.26
jobs:
release-linux:
runs-on: ubuntu-latest
env:
artifact: parallelserverproxy-glnxa64.tar.gz
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
- name: Run unit tests
run: go test ./...
- name: Build executable
run: env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o parallelserverproxy main.go
- name: Run executable
run: ./parallelserverproxy -help
- name: Create tar file
run: tar -czvf ${{ env.artifact }} parallelserverproxy licenses
- name: Upload artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ${{ env.artifact }}
release-windows:
runs-on: windows-latest
env:
artifact: parallelserverproxy-win64.zip
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
- name: Run unit tests
run: go test ./...
- name: Build executable
run: env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o parallelserverproxy.exe main.go
- name: Run executable
run: ./parallelserverproxy.exe -help
- name: Create zip file
run: Compress-Archive -Path parallelserverproxy.exe, licenses -Destination ${{ env.artifact }}
- name: Upload artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ${{ env.artifact }}