-
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
2c728ca
commit c8c0af0
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
name: pre-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
pre-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Fetch all history for all tags and branches | ||
run: git fetch --prune --unshallow | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9 | ||
with: | ||
versionSpec: '5.1.x' | ||
- name: Use GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/execute@v0.9 | ||
- run: | | ||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build with dotnet | ||
run: dotnet build --configuration Release --no-restore | ||
- name: Test with dotnet | ||
run: dotnet test --no-restore | ||
- name: Pack with dotnet | ||
run: dotnet pack -c Release -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }} --no-restore -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output nuget-packages | ||
# - name: Push with dotnet | ||
# run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json | ||
- name: Archive packages | ||
uses: actions/upload-artifact@v2.1.4 | ||
with: | ||
name: packages | ||
path: nuget-packages/*.nupkg | ||
- name: Archive symbols | ||
uses: actions/upload-artifact@v2.1.4 | ||
with: | ||
name: symbols | ||
path: nuget-packages/*.snupkg | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Development Build" | ||
files: | | ||
LICENSE.txt | ||
*.nupkg | ||
*.snupkg |