diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
index defad0a..a0a69f4 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -10,7 +10,15 @@ on:
- opened
- reopened
- synchronize
- workflow_dispatch: {}
+ workflow_dispatch:
+ inputs:
+ release-type:
+ type: choice
+ default: prerelease
+ description: Release Type
+ options:
+ - release
+ - prerelease
concurrency:
group: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref }}
@@ -25,5 +33,7 @@ jobs:
steps:
- name: "Draft Release"
uses: release-drafter/release-drafter@v6.0.0
+ with:
+ prerelease: ${{ github.event.inputs.release-type == 'prerelease' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bdcfc6b..07c14e5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -8,12 +8,11 @@ on:
release:
types:
- published
- workflow_dispatch: {}
+ workflow_dispatch: {}
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
- NUGET_DIR: ${{ github.workspace}}/nuget
jobs:
publish:
@@ -26,10 +25,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Install GitVersion
- uses: gittools/actions/gitversion/setup@v1.1.1
- with:
- versionSpec: '5.x'
+
- name: Setup .NET Core SDK 8
uses: actions/setup-dotnet@v4
with:
@@ -38,11 +34,6 @@ jobs:
- name: Restore .NET Packages
run: dotnet restore
- - name: Determine Version
- uses: gittools/actions/gitversion/execute@v1.1.1
- with:
- useConfigFile: true
-
- name: Build .NET Solution
run: dotnet build --configuration Release --no-restore
@@ -55,9 +46,16 @@ jobs:
run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
- - name: Publish .NET Solution to NuGet.org
- env:
- apikey: ${{ secrets.NUGET_ORG_KEY }}
+ - name: Store .NET Package
+ uses: actions/upload-artifact@v4
+ with:
+ name: nuget
+ if-no-files-found: error
+ retention-days: 7
+ path: pack/*.(s?)nupkg
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
- run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget
+
+ - name: Publish .NET Solution to NuGet.org
continue-on-error: true
+ run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget
+ if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
diff --git a/Directory.Build.props b/Directory.Build.props
index b05a28b..85d8219 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,6 +6,10 @@
https://github.com/InfinityFlowApp/tools-nuget-branding
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 4199017..839166d 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,6 +3,7 @@
true
+
diff --git a/GitVersion.yml b/GitVersion.yml
index 403b71c..7cf553d 100644
--- a/GitVersion.yml
+++ b/GitVersion.yml
@@ -1,4 +1,6 @@
+mode: ContinuousDeployment
branches:
master:
- mode: ContinuousDeployment
tag: rc
+ pull-request:
+ tag: pr