-
Notifications
You must be signed in to change notification settings - Fork 56
71 lines (59 loc) · 2.75 KB
/
release-build.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
69
70
71
name: Build and Deploy
on:
push:
branches:
- master
workflow_dispatch:
env:
DOTNET_NOLOGO: true # Disable the .NET logo in the console output
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_AUTH_TOKEN: ${{secrets.PUBLISH_TO_NUGET_ORG}} # <-- This is the token for the GitHub account you want to use.
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Build BlazorStateAnalyzer
run: |
cd ${{ github.workspace }}/Source/BlazorStateAnalyzer/
dotnet clean --configuration Release
dotnet build --configuration Release
- name: Build and Pack BlazorState
run: |
cd ${{ github.workspace }}/Source/BlazorState/
dotnet clean --configuration Release
dotnet build --configuration Release
dotnet pack --configuration Release
- name: Build and Pack TimeWarp.State.Middleware
run: |
cd ${{ github.workspace }}/Source/TimeWarp.State.Middleware/
dotnet clean --configuration Release
dotnet build --configuration Release
dotnet pack --configuration Release
- name: Publish BlazorState
run: |
cd Source/BlazorState/bin/Release
dotnet nuget push Blazor-State.*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}}
# Assuming snupkg files are in the same directory and are named correspondingly
- name: Publish TimeWarp.State.Middleware
run: |
cd Source/TimeWarp.State.Middleware/bin/Release
dotnet nuget push TimeWarp.State.Middleware.*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}}
# Assuming snupkg files are in the same directory and are named correspondingly
- run: echo "🍏 This job's status is ${{ job.status }}."