From 675e1eb2831ff0043745b11e7856059592d47f62 Mon Sep 17 00:00:00 2001 From: Raphael Abreu Date: Tue, 29 Sep 2020 21:27:02 -0300 Subject: [PATCH] Pinning version for action, changing pre release tags and introducing trigger for manual tagging --- .github/workflows/pre-release.yml | 2 +- .github/workflows/release.yml | 29 ++++++++++++++++++----------- GitVersion.yml | 1 + 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 7bcc8bc..49dd617 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9f0f58..0e1b8bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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: @@ -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 diff --git a/GitVersion.yml b/GitVersion.yml index 2210324..1faeefa 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1 +1,2 @@ mode: ContinuousDeployment +continuous-delivery-fallback-tag: alpha \ No newline at end of file