-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.65 KB
/
build.yaml
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
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
build:
name: "Build packages"
strategy:
matrix:
os:
- "windows-latest"
- "ubuntu-latest"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: '8'
- name: "Publish binary"
run: "dotnet publish ./E5Renewer --output dist"
- name: "Get build environment info"
id: build-env-info
run: |
# machine=x86_64
python -c 'import platform;print("machine={}".format(platform.machine()))' | tee $GITHUB_OUTPUT
# system=ubuntu
echo system=${{ matrix.os }} | cut -d - -f 1 | tee $GITHUB_OUTPUT
- name: "Create archive"
run: "7z a E5Renewer-${{ steps.build-env-info.outputs.system }}-${{ steps.build-env-info.outputs.machine }}.7z dist/*"
- name: "Upload archive"
uses: "actions/upload-artifact@v4"
with:
name: "E5Renewer-${{ steps.build-env-info.outputs.system }}-${{ steps.build-env-info.outputs.machine }}"
path: "E5Renewer-${{ steps.build-env-info.outputs.system }}-${{ steps.build-env-info.outputs.machine }}.7z"
release:
name: "Upload release"
runs-on: "ubuntu-latest"
needs: "build"
steps:
- name: "Download archive"
uses: "actions/download-artifact@v4"
- name: "Create release"
uses: "softprops/action-gh-release@v2"
with:
files: "E5Renewer-*.7z"
generate_release_notes: true