From 6804e8844bf66e30399b49e09863a85187b689dd Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Tue, 17 Nov 2020 09:44:42 +0000 Subject: [PATCH] Workflow updates --- .github/workflows/createrelease.yml | 11 +++-------- .github/workflows/nightlybuild.yml | 9 ++------- .github/workflows/prereleasenuget.yml | 17 +++++++---------- .github/workflows/pullrequest.yml | 7 +------ .github/workflows/release-management.yml | 2 +- 5 files changed, 14 insertions(+), 32 deletions(-) diff --git a/.github/workflows/createrelease.yml b/.github/workflows/createrelease.yml index cc110ea..fd14efb 100644 --- a/.github/workflows/createrelease.yml +++ b/.github/workflows/createrelease.yml @@ -13,17 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2.3.4 - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.102 - - name: Restore Nuget Packages run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json @@ -77,7 +72,7 @@ jobs: - name: Get Release id: getrelease - uses: octokit/request-action@v1.x + uses: octokit/request-action@v2.0.17 with: route: GET /repos/StuartFerguson/Messaging/releases/tags/${{ steps.get_version.outputs.VERSION }} env: @@ -85,7 +80,7 @@ jobs: - name: Build Release Notes id: buildreleasenotes - uses: gr2m/get-json-paths-action@v1.x + uses: gr2m/get-json-paths-action@v1.0.4 with: json: ${{ steps.getrelease.outputs.data }} releasenote: "body" diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index b3bc3f3..cf8142a 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -14,12 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.102 + - uses: actions/checkout@v2.3.4 - name: Restore Nuget Packages run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json @@ -35,7 +30,7 @@ jobs: dotnet test "MessagingService.Tests\MessagingService.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - name: Setup Node.js for use with actions - uses: actions/setup-node@v1.1.0 + uses: actions/setup-node@v1.4.4 - name: Combine Coverage run: | diff --git a/.github/workflows/prereleasenuget.yml b/.github/workflows/prereleasenuget.yml index ab78aaf..f50eef3 100644 --- a/.github/workflows/prereleasenuget.yml +++ b/.github/workflows/prereleasenuget.yml @@ -15,12 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v2.3.4 with: - dotnet-version: 3.1.102 + fetch-depth: 0 - name: Restore Nuget Packages run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json @@ -28,13 +25,13 @@ jobs: - name: Build Code run: dotnet build MessagingService.sln --configuration Release - - name: Get the last version - id: get_version - run: echo ::set-output name=VERSION::$(git tag --sort=committerdate | tail -1) - + - name: 'Get Previous tag' + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@1.0.0" + - name: Print Version id: next_version - run: echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}-build$GITHUB_RUN_NUMBER + run: echo ::set-output name=VERSION::${{ steps.previoustag.outputs.tag }}-build$GITHUB_RUN_NUMBER - name: Build and Publish Nuget Packages run: | diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 87a0966..1ff87c4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -14,12 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.102 + - uses: actions/checkout@v2.3.4 - name: Restore Nuget Packages run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json diff --git a/.github/workflows/release-management.yml b/.github/workflows/release-management.yml index 83d8d98..79b1204 100644 --- a/.github/workflows/release-management.yml +++ b/.github/workflows/release-management.yml @@ -11,6 +11,6 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: toolmantim/release-drafter@v5.2.0 + - uses: toolmantim/release-drafter@v5.12.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}