-
Notifications
You must be signed in to change notification settings - Fork 22
53 lines (44 loc) · 1.44 KB
/
release.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
name: Run Release Release
on:
push:
branches:
- main
jobs:
release-package:
runs-on: windows-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: |
6.0.x
7.0.x
source-url: https://nuget.pkg.github.com/open-feature/index.json
- name: Install dependencies
if: ${{ steps.release.outputs.releases_created }}
run: dotnet restore
- name: Build
if: ${{ steps.release.outputs.releases_created }}
run: |
dotnet build --configuration Release --no-restore -p:Deterministic=true
- name: Pack
if: ${{ steps.release.outputs.releases_created }}
run: |
dotnet pack --configuration Release --no-build
- name: Publish to Nuget
if: ${{ steps.release.outputs.releases_created }}
run: |
dotnet nuget push --skip-duplicate "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_TOKEN}}