-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (39 loc) · 1.41 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
name: Publish
on:
push:
tags:
- "*"
pull_request:
tags:
- "*"
env:
PROJECT_PATH: "SiemensIXBlazor/SiemensIXBlazor.csproj"
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: Make build-npm.sh executable
run: chmod +x .github/build-npm.sh
- name: Run build-npm.sh
run: .github/build-npm.sh
- name: Build Project
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
- name: Test with the dotnet CLI
run: dotnet test
- name: "Get Version"
id: version
uses: battila7/get-version-action@v2
- name: "Pack Project"
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: "Push Package"
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate --no-symbols