Skip to content

Commit

Permalink
Create pre-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaabreu committed Sep 29, 2020
1 parent 2c728ca commit c8c0af0
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pre-release.yml
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

0 comments on commit c8c0af0

Please sign in to comment.