-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (88 loc) · 3.12 KB
/
push.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
on:
push:
paths-ignore:
- "README.md"
- "ChangeLog.md"
- ".github/workflows/pull_request.yaml"
- ".github/workflows/release.yaml"
jobs:
default:
strategy:
matrix:
os:
- windows-2022
- ubuntu-20.04
- macos-11
- macos-12-arm
include:
- os: windows-2022
osimage: windows-2022
exename: cs2mmd.exe
runtime: win-x64
- os: ubuntu-20.04
osimage: ubuntu-20.04
exename: cs2mmd
runtime: linux-x64
- os: macos-11
osimage: macos-11
exename: cs2mmd
runtime: osx-x64
- os: macos-12-arm
osimage: macos-11
exename: cs2mmd
runtime: osx-arm64
runs-on: ${{ matrix.osimage }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
name: "setup dotnet 7.0"
with:
dotnet-version: "7.0.x"
- uses: actions/setup-dotnet@v2
name: "setup dotnet 8.0"
with:
dotnet-version: "8.0.x"
- run: "pwsh ./build.ps1 --target Test --configuration Release"
name: "running test suite"
- name: "build nuget package"
run: "pwsh ./build.ps1 --target Pack --configuration Release --version-suffix alpha.${{ github.run_number }}"
if: ${{ matrix.os == 'windows-2022' }}
- name: "build tgz binary"
run: "pwsh ./build.ps1 --target ArchiveTgz --configuration Release --runtime ${{ matrix.runtime }} --version-suffix alpha.${{ github.run_number }}"
if: ${{ matrix.os != 'windows-2022'}}
- name: "build zip binary"
run: "pwsh ./build.ps1 --target ArchiveZip --configuration Release --runtime ${{ matrix.runtime }} --version-suffix alpha.${{ github.run_number }}"
if: ${{ matrix.os == 'windows-2022'}}
- name: "collect nupkg"
uses: actions/upload-artifact@v3
with:
name: nupkg
path: |
artifacts/Release/Any/*.nupkg
artifacts/Release/Any/*.snupkg
if: ${{ matrix.os == 'windows-2022' }}
- name: push nuget package to github package registry
run: "pwsh ./build.ps1 --target Push --configuration Release --api-key ${{secrets.GITHUB_TOKEN}} --package-source https://nuget.pkg.github.com/itn3000/index.json"
if: ${{ matrix.os == 'windows-2022' }}
- name: "collect tgz binary"
uses: actions/upload-artifact@v3
with:
name: "tgz-${{ matrix.runtime }}"
path: "artifacts/archive/Release/${{ matrix.runtime }}/*.tgz"
if: ${{ matrix.os != 'windows-2022' }}
- name: "collect zip binary"
uses: actions/upload-artifact@v3
with:
name: "zip-${{ matrix.runtime }}"
path: "artifacts/archive/Release/${{ matrix.runtime }}/*.zip"
if: ${{ matrix.os == 'windows-2022' }}
get_artifact_list:
runs-on: ubuntu-20.04
needs: default
steps:
- uses: actions/download-artifact@v3
name: "downloading artifacts"
with:
path: artifacts
- name: list files
run: ls -R artifacts