forked from rossknudsen/Kavod.Vba.Compression
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.83 KB
/
release.yml
File metadata and controls
78 lines (63 loc) · 1.83 KB
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
name: release
on:
push:
tags: [ 'v*.*.*' ]
permissions:
id-token: write
contents: write
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
ContinuousIntegrationBuild: true
RestoreLockedMode: true
Configuration: Release
RepositoryBranch: '${{ github.ref_name }}'
RepositoryCommit: '${{ github.sha }}'
jobs:
release:
runs-on: ubuntu-24.04
environment:
name: production
url: https://www.nuget.org/packages/NetOfficeFw.VbaCompression
steps:
- name: checkout
uses: actions/checkout@v5
- name: setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8
10
- name: restore
run: dotnet restore
- name: build
run: dotnet build --no-restore
- name: test
run: dotnet test --no-build --no-restore
- name: pack
run: dotnet pack --no-build --no-restore -o dist
- name: publish artifact
uses: actions/upload-artifact@v5
with:
name: VbaCompression_packages
path: |
${{ github.workspace }}/dist
${{ github.workspace }}/src/Kavod.Vba.Compression/README.md
- name: authenticate nuget.org
uses: NuGet/login@v1
id: nuget
with:
user: ${{ secrets.NUGET_PUSH_USER }}
- name: publish
working-directory: '${{ github.workspace}}/dist'
run: |
dotnet nuget push "*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ steps.nuget.outputs.NUGET_API_KEY }}
- name: release
uses: softprops/action-gh-release@v2
if: always() && startsWith(github.ref, 'refs/tags/')
with:
name: 'VbaCompression ${{ github.ref_name }}'
body_path: ${{ github.workspace }}/src/Kavod.Vba.Compression/README.md