Skip to content

Commit 3546255

Browse files
authored
Merge pull request #32 from ChangemakerStudios/feature/updated-git-actions
Update GitHub Actions workflow to latest versions
2 parents 3e87bb2 + 91bc4dc commit 3546255

3 files changed

Lines changed: 25 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,47 @@ name: Build and Push to Nuget
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
issues: read
8+
checks: write
9+
pull-requests: write
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
515
jobs:
616
build:
717
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
dotnet-version: [8.x]
11-
18+
1219
steps:
1320
- name: Checkout
1421
uses: actions/checkout@v4
1522
with:
1623
fetch-depth: 0
17-
24+
1825
- name: Setup Dotnet
1926
uses: actions/setup-dotnet@v4
2027
with:
21-
dotnet-version: ${{ matrix.dotnet-version }}
28+
dotnet-version: |
29+
6.x
30+
8.x
2231
2332
- name: Install GitVersion
24-
uses: gittools/actions/gitversion/setup@v1.1.1
33+
uses: gittools/actions/gitversion/setup@v4.1.0
2534
with:
26-
versionSpec: '5.x'
27-
35+
versionSpec: '6.x'
36+
2837
- name: GitVersion
2938
id: gitversion
30-
uses: gittools/actions/gitversion/execute@v1.1.1
31-
with:
32-
useConfigFile: true
39+
uses: gittools/actions/gitversion/execute@v4.1.0
3340

3441
- name: Run Tests
3542
run: dotnet test --logger trx --collect:"XPlat Code Coverage"
3643

3744
- name: Combine Coverage Reports # This is because one report is produced per project, and we want one result for all of them.
38-
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
45+
uses: danielpalme/ReportGenerator-GitHub-Action@5.4.16
3946
with:
4047
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
4148
targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
@@ -81,16 +88,15 @@ jobs:
8188
retention-days: 5
8289

8390
- name: Publish Test Results
84-
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
91+
uses: EnricoMi/publish-unit-test-result-action/linux@v2.20.0
8592
if: always()
8693
with:
87-
trx_files: "${{ github.workspace }}/**/*.trx"
94+
files: "${{ github.workspace }}/**/*.trx"
8895

8996
- name: Pack
90-
run: dotnet pack src/Docker.Registry.DotNet -c Release -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
97+
run: dotnet pack src/Docker.Registry.DotNet -c Release -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
9198

9299
- name: Publish
93100
if: github.event_name != 'pull_request' && (github.ref_name == 'master')
94101
run: |
95102
dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGETKEY }} --skip-duplicate
96-
dotnet nuget push **/*.snupkg --source 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGETKEY }} --skip-duplicate

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,4 @@ __pycache__/
286286
*.btm.cs
287287
*.odx.cs
288288
*.xsd.cs
289+
settings.local.json

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mode: Mainline
1+
mode: ContinuousDelivery
22
branches: {}
33
ignore:
44
sha: []

0 commit comments

Comments
 (0)