-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Nuget release when new published release * Added some comments * Removed current nuget release * Added forgotten slashes
- Loading branch information
1 parent
2bd2a45
commit 90468e8
Showing
8 changed files
with
59 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release (nuget) | ||
|
||
# Trigger the workflow on a release event when a new release is published | ||
on: | ||
release: | ||
types: [published] | ||
|
||
# Define environment variables | ||
env: | ||
DOTNET_VERSION: 8.0.x | ||
CONFIGURATION: Release | ||
|
||
jobs: | ||
nuget-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Step to set the application version from the release tag | ||
- name: Set Application Version (Environment Variable) | ||
run: | | ||
APP_VERSION=$(echo '${{ github.event.release.tag_name }}' | cut -d 'v' -f 2) | ||
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: Pack NuGet Packages | ||
run: | | ||
dotnet pack ./neo.sln \ | ||
--configuration Release \ | ||
--output ./sbin \ | ||
--verbosity normal \ # Normal verbosity level | ||
-p:VersionPrefix=${{ env.APP_VERSION }} # Set the version prefix from tag_name | ||
- name: Publish to NuGet.org | ||
run: | | ||
dotnet nuget push ./sbin/*.nupkg \ | ||
--source https://api.nuget.org/v3/index.json \ | ||
--api-key ${{ secrets.NUGET_TOKEN }} \ | ||
--skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters