-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.3 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
54
name: release
on:
push:
branches:
- master
defaults:
run:
shell: bash
permissions:
contents: write
issues: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'
- name: prepare csharp-dotnet-sdk
run: |
dotnet build --configuration Release
dotnet test --configuration Release --no-restore
dotnet pack --configuration Release --no-build --no-restore --output .
- name: pause to avoid 2ndary rate limits # https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#about-secondary-rate-limits
run: |
sleep "$(echo $RANDOM % 10 + 1 | bc)"
- uses: cycjimmy/[email protected]
with:
semantic_version: 18
extra_plugins: |
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to NuGet
run: |
dotnet nuget push \
"$(ls -a AffixApi.Api.*.nupkg)" \
--source https://api.nuget.org/v3/index.json \
-k ${{ secrets.NUGET_API_KEY }}