Skip to content

Commit

Permalink
Merge pull request #9 from sia-digital/build/fix-versioning
Browse files Browse the repository at this point in the history
Build/fix versioning
  • Loading branch information
lukas-kd authored Nov 23, 2023
2 parents 4ac00d1 + b1df349 commit 0228916
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/dotnet-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches: [ "main" ]
permissions:
contents: read
contents: write
issues: read
checks: write
pull-requests: write
Expand Down Expand Up @@ -81,14 +81,18 @@ jobs:
run: cat ./coverage-results/Summary.md >> $GITHUB_STEP_SUMMARY

- name: Create package
run: dotnet pack --no-restore --nologo --no-build -p:PackageOutputPath='./publish' -c Release -p:PackageVersion=${NBGV_SimpleVersion} -p:PublicRelease=true -p:SymbolPackageFormat=snupkg --include-symbols --include-source
run: dotnet pack --no-restore --nologo --no-build -p:PackageOutputPath='./publish' -c Release -p:PackageVersion=${NBGV_NuGetPackageVersion} -p:PublicRelease=true -p:SymbolPackageFormat=snupkg --include-symbols --include-source

- name: Upload publish artifacts
uses: actions/upload-artifact@v3
- name: Publish nuget packages
run: dotnet nuget push "**/publish/*.nupkg" -s 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}

- name: Create tag
run: ngbv tag v${NBGV_NuGetPackageVersion}

- uses: ncipollo/release-action@v1
with:
name: upload artifacts
path: '**/publish/*'
tag: v${NBGV_SimpleVersion}
generateReleaseNotes: true


- name: Publish nuget packages
run: dotnet nuget push "**/publish/*.nupkg" -s 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate

4 changes: 0 additions & 4 deletions .github/workflows/dotnet-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: retrieve version
uses: dotnet/nbgv@master
id: nbgv

- name: install
run: dotnet restore

Expand Down
14 changes: 7 additions & 7 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.0.0",
"version": "1.0",
"gitCommitIdShortAutoMinimum": 7,
"nugetPackageVersion": {
"semVer": 2
},
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
],
"release": {
"branchName": "release/v{version}"
}
"^refs/heads/main$"
]
}

0 comments on commit 0228916

Please sign in to comment.