Skip to content

Commit 014e1e0

Browse files
committed
- fix gh actions
1 parent 837cd85 commit 014e1e0

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup .NET
2626
uses: actions/setup-dotnet@v4
2727
with:
28-
dotnet-version: 8.0.x
28+
dotnet-version: 9.0.x
2929

3030
- name: Install GitVersion
3131
uses: gittools/actions/gitversion/setup@v0.9.15

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release (Stable)
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, master ]
66
workflow_dispatch:
77

88
permissions:
@@ -12,6 +12,8 @@ permissions:
1212
jobs:
1313
release:
1414
runs-on: ubuntu-latest
15+
env:
16+
working-directory: ${{ github.workspace }}
1517
steps:
1618
- name: Checkout
1719
uses: actions/checkout@v4
@@ -21,16 +23,16 @@ jobs:
2123
- name: Setup .NET
2224
uses: actions/setup-dotnet@v4
2325
with:
24-
dotnet-version: 8.0.x
26+
dotnet-version: 9.0.x
2527

2628
- name: Install GitVersion
27-
uses: gittools/actions/gitversion/setup@v3
29+
uses: gittools/actions/gitversion/setup@v0.9.15
2830
with:
29-
versionSpec: '6.x'
31+
versionSpec: 5.x
3032

3133
- name: Determine Version
3234
id: gitversion
33-
uses: gittools/actions/gitversion/execute@v3
35+
uses: gittools/actions/gitversion/execute@v0.9.15
3436
with:
3537
useConfigFile: true
3638

@@ -48,12 +50,15 @@ jobs:
4850
4951
- name: Restore
5052
run: dotnet restore
53+
working-directory: '${{ env.working-directory }}'
5154

5255
- name: Build
5356
run: dotnet build -c Release --no-restore
57+
working-directory: '${{ env.working-directory }}'
5458

5559
- name: Test
5660
run: dotnet test -c Release --no-build
61+
working-directory: '${{ env.working-directory }}'
5762

5863
- name: Pack Stable
5964
run: |
@@ -83,6 +88,7 @@ jobs:
8388
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate
8489

8590
- name: Publish to NuGet
91+
if: ${{ startsWith(github.head_ref, 'release/')}}
8692
env:
8793
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
8894
run: |

MyLibrary.sln

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3335C1A3
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{0C111405-B10C-4C80-81B7-575210C0BE47}"
1111
ProjectSection(SolutionItems) = preProject
12-
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
13-
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
12+
.github\workflows\ci.yml = .github\workflows\ci.yml
13+
.github\workflows\release.yml = .github\workflows\release.yml
1414
EndProjectSection
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{11FFA13F-539E-4B09-A2E2-4F80F4857F30}"
1717
ProjectSection(SolutionItems) = preProject
18-
..\.gitignore = ..\.gitignore
19-
..\Directory.Build.props = ..\Directory.Build.props
20-
..\GitVersion.yml = ..\GitVersion.yml
21-
..\LICENSE = ..\LICENSE
22-
..\nuget.config = ..\nuget.config
23-
..\README.md = ..\README.md
18+
.gitignore = .gitignore
19+
Directory.Build.props = Directory.Build.props
20+
GitVersion.yml = GitVersion.yml
21+
LICENSE = LICENSE
22+
nuget.config = nuget.config
23+
README.md = README.md
2424
EndProjectSection
2525
EndProject
2626
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLibrary", "src\MyLibrary\MyLibrary.csproj", "{6C551900-944F-2C98-0A0F-F58A5DA9B2EF}"

0 commit comments

Comments
 (0)