Skip to content

Commit e348a4b

Browse files
committed
Update nuget-release.yml
1 parent 83290a1 commit e348a4b

1 file changed

Lines changed: 24 additions & 25 deletions

File tree

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
11
on:
22
push:
33
tags:
4-
- "v[0-9]+.[0-9]+.[0-9]+"
4+
- "v[0-9]+.[0-9]+.[0-9]+"
55
jobs:
66
build:
77
runs-on: ubuntu-latest
88
timeout-minutes: 15
99
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v4
10+
- name: Checkout
11+
uses: actions/checkout@v4
1212

13-
- name: Setup .NET
14-
uses: actions/setup-dotnet@v4
15-
with:
16-
dotnet-version: '8.x.x'
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v4
15+
with:
16+
dotnet-version: "9.x.x"
1717

18-
- name: Verify commit exists in origin/main
19-
run: |
20-
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
21-
git branch --remote --contains | grep origin/main
18+
- name: Verify commit exists in origin/main
19+
run: |
20+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
21+
git branch --remote --contains | grep origin/main
2222
23-
- name: Set VERSION variable from tag
24-
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
23+
- name: Set VERSION variable from tag
24+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
2525

26-
- name: Build
27-
run: dotnet build src --configuration Release /p:Version=${VERSION}
28-
29-
- name: Push
30-
run: |
31-
for package in $(find ./src -name "*.nupkg"); do
32-
# echo "Should publish $package to nuget"
33-
# dotnet nuget push "$package" --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN} &
34-
done
35-
wait
36-
env:
37-
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
26+
- name: Build
27+
run: dotnet build src --configuration Release /p:Version=${VERSION}
3828

29+
- name: Push
30+
run: |
31+
for package in $(find ./src -name "*.nupkg"); do
32+
echo "Should publish $package to nuget"
33+
# dotnet nuget push "$package" --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN} &
34+
done
35+
wait
36+
env:
37+
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

0 commit comments

Comments
 (0)