-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (61 loc) · 1.98 KB
/
publish.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
target: ["win-x64", "linux-x64", "osx-x64", "osx-arm64"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: OneWare.Ghdl/OneWare.Ghdl.csproj
- name: Build ${{ matrix.target }}
run: dotnet build OneWare.Ghdl/OneWare.Ghdl.csproj -c Release -r ${{ matrix.target }} -o publish
- name: Compress ${{ matrix.target }}
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ../OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip
directory: ./publish
- uses: actions/upload-artifact@v3
with:
name: OneWare_GhdlExtension_${{ matrix.target }}
if-no-files-found: error
retention-days: 7
path: ./OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: OneWare.Ghdl/OneWare.Ghdl.csproj
- uses: actions/download-artifact@v3
with:
path: ./artifacts
- uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/**/*.zip"
tag: ${{steps.get-version.outputs.version}}
allowUpdates: true