Skip to content

Commit

Permalink
Pinning version for action, changing pre release tags and introducing…
Browse files Browse the repository at this point in the history
… trigger for manual tagging
  • Loading branch information
raphaabreu committed Sep 30, 2020
1 parent 0bfe984 commit 675e1eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
with:
name: symbols
path: nuget-packages/*.snupkg
- uses: "marvinpinto/action-automatic-releases@latest"
- uses: "marvinpinto/action-automatic-releases@v1.1.0"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: .NET Core
name: "tagged-release"

on:
release:
types: [published]
push:
tags:
- "v*"

jobs:
release:

tagged-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
Expand All @@ -21,7 +20,7 @@ jobs:
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9
- run: |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Install dependencies
Expand All @@ -31,9 +30,9 @@ jobs:
- name: Test with dotnet
run: dotnet test --no-restore
- name: Pack with dotnet
run: dotnet pack -c Release -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --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
run: dotnet pack -c Release -p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }} --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:
Expand All @@ -44,4 +43,12 @@ jobs:
with:
name: symbols
path: nuget-packages/*.snupkg

- uses: "marvinpinto/action-automatic-releases@v1.1.0"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
title: v${{ steps.gitversion.outputs.NuGetVersionV2 }}
files: |
LICENSE
nuget-packages/*.nupkg
nuget-packages/*.snupkg
1 change: 1 addition & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
mode: ContinuousDeployment
continuous-delivery-fallback-tag: alpha

0 comments on commit 675e1eb

Please sign in to comment.