-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Project authoring, add github actions for NuGet version releases
- Loading branch information
Showing
3 changed files
with
55 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 'Studio Client .NET NuGet Release' | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
PROJECT_PATH: 'StudioClient/StudioClient.csproj' | ||
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output | ||
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ${{ env.PROJECT_PATH }} | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release | ||
|
||
- name: 'Get Version' | ||
id: version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- name: Pack | ||
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | ||
|
||
- name: Nuget Push | ||
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -s ${{ env.NUGET_SOURCE_URL }} -k ${{ env.NUGET_API_KEY }} --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
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