-
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.
- Loading branch information
1 parent
d3208b4
commit c767acb
Showing
1 changed file
with
45 additions
and
45 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 |
---|---|---|
|
@@ -16,63 +16,63 @@ jobs: | |
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 5.x | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 5.x | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
id: gitversion | ||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
id: gitversion | ||
|
||
- name: Display GitVersion outputs | ||
run: | | ||
echo "Version: ${{ steps.gitversion.outputs.SemVer }}" | ||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" | ||
- name: Display GitVersion outputs | ||
run: | | ||
echo "Version: ${{ steps.gitversion.outputs.SemVer }}" | ||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
global-json-file: global.json | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
global-json-file: global.json | ||
|
||
- name: Tool Restore | ||
run: dotnet tool restore | ||
- name: Tool Restore | ||
run: dotnet tool restore | ||
|
||
- name: Test | ||
run: dotnet nuke test | ||
- name: Test | ||
run: dotnet nuke test | ||
|
||
- name: Build and Pack NuGet package | ||
run: dotnet pack src/ --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Package | ||
- name: Build and Pack NuGet package | ||
run: dotnet pack --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Package | ||
|
||
- name: Upload lib NuGet package artifact to GitHub | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: libPackage | ||
path: ./Package | ||
- name: Upload lib NuGet package artifact to GitHub | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: libPackage | ||
path: ./Package | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' && needs.build.outputs.CommitsSinceVersionSource > 0 #Only release if there has been a commit/version change | ||
needs: build | ||
|
||
steps: | ||
- name: Download lib nuget package artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: libPackage | ||
|
||
- name: Push package to Nuget | ||
run: | | ||
dotnet nuget push libPackage/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ needs.build.outputs.Version }} | ||
name: Release ${{ needs.build.outputs.Version }} | ||
artifacts: "libPackage/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Download lib nuget package artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: libPackage | ||
|
||
- name: Push package to Nuget | ||
run: | | ||
dotnet nuget push libPackage/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ needs.build.outputs.Version }} | ||
name: Release ${{ needs.build.outputs.Version }} | ||
artifacts: "libPackage/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} |