Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
DOTNET_VERSION: "10.x"
NUGET_PACKAGE_NAME: "ClosureOSS.WebPush"

permissions:
contents: write
Expand All @@ -22,7 +23,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -31,19 +33,17 @@ jobs:
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
cache: true
cache-dependency-path: "**/packages.lock.json"

- name: Restore dependencies
run: dotnet restore --locked-mode
cache-dependency-path: '**/packages.lock.json'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.5.0

- name: Determine Version
id: gitversion
id: meta
uses: gittools/actions/gitversion/execute@v4.5.0
with:
updateProjectFiles: true

- name: Restore dependencies
run: dotnet restore --locked-mode

- name: Build
run: dotnet build --no-restore -c Release
Expand All @@ -54,6 +54,6 @@ jobs:
- name: Upload Nuget package as Artifact
uses: actions/upload-artifact@v6
with:
name: ClosureOSS.WebPush.${{ steps.gitversion.outputs.FullSemVer }}
name: ${{ env.NUGET_PACKAGE_NAME }}.${{ steps.meta.outputs.SemVer }}
path: ./artifacts/package/release/*nupkg
retention-days: 1
24 changes: 12 additions & 12 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 🎁 Publish nuget package

on:
workflow_dispatch:
push:
tags:
- "v[0-9]*.[0-9]*.[0-9]*" # Pattern for standard: v1.2.3
Expand All @@ -14,7 +15,7 @@ permissions:
pull-requests: read

jobs:
publish:
release:
runs-on: ubuntu-latest
environment: public-release

Expand All @@ -31,17 +32,15 @@ jobs:
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore dependencies
run: dotnet restore --locked-mode

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.5.0

- name: Determine Version
id: gitversion
id: meta
uses: gittools/actions/gitversion/execute@v4.5.0
with:
updateProjectFiles: true

- name: Restore dependencies
run: dotnet restore --locked-mode

- name: Build
run: dotnet build --no-restore -c Release
Expand All @@ -55,11 +54,12 @@ jobs:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
name: "${{ github.ref_name }}"
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || format('v{0}', steps.meta.outputs.SemVer) }}
name: ${{ github.ref_type == 'tag' && github.ref_name || format('v{0}', steps.meta.outputs.SemVer) }}
generate_release_notes: true
files: ./artifacts/package/release/*nupkg
prerelease: ${{ steps.gitversion.outputs.PreReleaseTag != '' }}
target_commitish: ${{ github.sha }}
draft: false
prerelease: ${{ steps.meta.outputs.PreReleaseTag != '' }}
make_latest: ${{ steps.meta.outputs.PreReleaseTag == '' }}
5 changes: 5 additions & 0 deletions GitVersion.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
workflow: GitHubFlow/v1
mode: ContinuousDelivery
branches:
main:
label: "beta"
feature:
mode: ContinuousDelivery
assembly-versioning-format: '{MajorMinorPatch}.{WeightedPreReleaseNumber}'
assembly-file-versioning-format: '{MajorMinorPatch}.{WeightedPreReleaseNumber}'
assembly-informational-format: '{MajorMinorPatch}.{WeightedPreReleaseNumber}'
2 changes: 1 addition & 1 deletion WebPush/WebPush.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<None Include="../README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="3.0.61" Condition="'$(Configuration)' == 'Debug'">
<PackageReference Include="Meziantou.Analyzer" Version="3.0.63" Condition="'$(Configuration)' == 'Debug'">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
18 changes: 9 additions & 9 deletions WebPush/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"Meziantou.Analyzer": {
"type": "Direct",
"requested": "[3.0.61, )",
"resolved": "3.0.61",
"contentHash": "Ed/5bKmY38QbQJgL9wmWnweX4mq3WaNYNq8kp4Hk/WPIFuLuK/P/dEB/ZnenQius+NNDXxTIiCXFPmQdLrHWMg=="
"requested": "[3.0.63, )",
"resolved": "3.0.63",
"contentHash": "WHkfz41Kilygfto/ABn2Q3/7xVTpxM5D74d8nJSzA4oAucACa4itSjfEh5lyvEoCRg8BvuyalD+A99GORTbjsw=="
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
Expand Down Expand Up @@ -76,9 +76,9 @@
},
"Meziantou.Analyzer": {
"type": "Direct",
"requested": "[3.0.61, )",
"resolved": "3.0.61",
"contentHash": "Ed/5bKmY38QbQJgL9wmWnweX4mq3WaNYNq8kp4Hk/WPIFuLuK/P/dEB/ZnenQius+NNDXxTIiCXFPmQdLrHWMg=="
"requested": "[3.0.63, )",
"resolved": "3.0.63",
"contentHash": "WHkfz41Kilygfto/ABn2Q3/7xVTpxM5D74d8nJSzA4oAucACa4itSjfEh5lyvEoCRg8BvuyalD+A99GORTbjsw=="
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
Expand Down Expand Up @@ -148,9 +148,9 @@
},
"Meziantou.Analyzer": {
"type": "Direct",
"requested": "[3.0.61, )",
"resolved": "3.0.61",
"contentHash": "Ed/5bKmY38QbQJgL9wmWnweX4mq3WaNYNq8kp4Hk/WPIFuLuK/P/dEB/ZnenQius+NNDXxTIiCXFPmQdLrHWMg=="
"requested": "[3.0.63, )",
"resolved": "3.0.63",
"contentHash": "WHkfz41Kilygfto/ABn2Q3/7xVTpxM5D74d8nJSzA4oAucACa4itSjfEh5lyvEoCRg8BvuyalD+A99GORTbjsw=="
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
Expand Down