forked from tatwd/prism-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (51 loc) · 2.2 KB
/
ci.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
name: Publish
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x.x
- name: Pack
run: >-
dotnet build PrismSharp.RegExCompiler/PrismSharp.RegExCompiler.csproj --configuration Release;
dotnet build PrismSharp.RegExProvider/PrismSharp.RegExProvider.csproj --configuration Release;
mkdir regex;
mkdir -p regex/netstandard2.0;
mkdir -p regex/net45;
mkdir -p regex/net8.0;
mkdir -p regex/net9.0;
dotnet run --project PrismSharp.RegExProvider/PrismSharp.RegExProvider.csproj --configuration Release -f net9.0 -- "$PWD/regex/netstandard2.0" netstandard2.0;
dotnet run --project PrismSharp.RegExProvider/PrismSharp.RegExProvider.csproj --configuration Release -f net9.0 -- "$PWD/regex/net45" net45;
dotnet run --project PrismSharp.RegExProvider/PrismSharp.RegExProvider.csproj --configuration Release -f net8.0 -- "$PWD/regex/net8.0" net8.0;
dotnet run --project PrismSharp.RegExProvider/PrismSharp.RegExProvider.csproj --configuration Release -f net9.0 -- "$PWD/regex/net9.0" net9.0;
dotnet build PrismSharp.SourceGenerator/PrismSharp.SourceGenerator.csproj --configuration Release;
dotnet build PrismSharp.Core/PrismSharp.Core.csproj --configuration Release;
dotnet pack PrismSharp.Core/PrismSharp.Core.csproj --configuration Release -o "./packages";
shell: pwsh
- uses: actions/upload-artifact@v4
with:
name: packages
path: "./packages"
publish:
runs-on: ubuntu-latest
needs: ["build"]
steps:
- uses: actions/download-artifact@v4
with:
name: packages
- name: Push to NuGet
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org
shell: pwsh
- name: Push to GPR
run: |
for f in ./packages/*.nupkg
do
curl -vX PUT -u "vslee:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/BUTR/
done
shell: bash