-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eugstman
committed
Dec 1, 2021
1 parent
fa8f46e
commit 6d35bbc
Showing
3 changed files
with
78 additions
and
90 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,68 @@ | ||
name: .NET Release build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
configFilePath: ./.github/Gitversion.yml | ||
|
||
- name: Display GitVersion outputs | ||
run: | | ||
echo "Major: ${{ env.GitVersion_SemVer }}" | ||
echo "Major: ${{ env.GitVersion_Major }}" | ||
echo "Minor: ${{ env.GitVersion_Minor }}" | ||
echo "Patch: ${{ env.GitVersion_Patch }}" | ||
echo "AssemblySemVer: ${{ env.GitVersion_AssemblySemVer }}" | ||
echo "AssemblySemFileVer: ${{ env.GitVersion_AssemblySemFileVer }}" | ||
- name: dotnet restore | ||
run: dotnet restore ./src/Homey.Net.sln | ||
|
||
- name: dotnet Build | ||
run: dotnet build -c Release -p:Version=${{ env.GitVersion_AssemblySemVer }} --no-restore ./src/Homey.Net.sln | ||
|
||
- name: dotnet Test | ||
run: dotnet test -c Release --no-build --verbosity normal ./src/Homey.Net.sln | ||
|
||
- name: Pack Nuget | ||
run: dotnet pack src/Homey.Net/Homey.Net.csproj -c Release -o publish /p:Version=${{ env.GitVersion.NuGetVersion }} | ||
|
||
- name: Upload artefact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: "Homey.Net_${{ env.GitVersion.NuGetVersion }}" | ||
path: src/**/*.nupkg | ||
if-no-files-found: error | ||
|
||
- name: Push generated package to GitHub registry | ||
run: dotnet nuget push src/Homey.Net/publish/*.nupkg --api-key ${NUGET_ORG_TOKEN} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NUGET_ORG_TOKEN }} |
This file was deleted.
Oops, something went wrong.