From 23681d1e29e68e78a81a952245a7c5d10401e1ba Mon Sep 17 00:00:00 2001 From: Brant Burnett Date: Tue, 28 May 2024 23:45:14 -0400 Subject: [PATCH] Update GHA versions (#238) --- .github/workflows/build.yml | 32 +++++++++++++++----------- .github/workflows/cleanup-packages.yml | 21 +++++++++++++---- GitVersion.yml | 5 ++++ 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b64bfbae..9fbb6d10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup .NET Core - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: # 6.0 needed for GitVersion dotnet-version: | @@ -26,17 +26,17 @@ jobs: 8.0.x - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.15 + uses: gittools/actions/gitversion/setup@v1 with: - versionSpec: "5.10.3" + versionSpec: "5.12.0" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.15 + uses: gittools/actions/gitversion/execute@v1 with: useConfigFile: true configFilePath: "GitVersion.yml" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} @@ -83,17 +83,23 @@ jobs: needs: build steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + # 6.0 needed for GitVersion + dotnet-version: | + 6.0.x - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.13 + uses: gittools/actions/gitversion/setup@v1 with: - versionSpec: "5.10.3" + versionSpec: "5.12.0" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.13 + uses: gittools/actions/gitversion/execute@v1 with: useConfigFile: true configFilePath: "GitVersion.yml" @@ -110,16 +116,16 @@ jobs: type=sha - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@v3 + - uses: docker/build-push-action@v5 with: context: . build-args: VERSION=${{ steps.gitversion.outputs.nuGetVersionV2 }} diff --git a/.github/workflows/cleanup-packages.yml b/.github/workflows/cleanup-packages.yml index 2d4392f0..b1e9dcdc 100644 --- a/.github/workflows/cleanup-packages.yml +++ b/.github/workflows/cleanup-packages.yml @@ -13,28 +13,39 @@ jobs: packages: write steps: - - uses: actions/delete-package-versions@v3 + - uses: actions/delete-package-versions@v5 with: package-name: Yardarm + package-type: nuget min-versions-to-keep: 30 ignore-versions: ^(?!.*ci-pr).*$ - - uses: actions/delete-package-versions@v3 + - uses: actions/delete-package-versions@v5 with: package-name: Yardarm.NewtonsoftJson + package-type: nuget min-versions-to-keep: 30 ignore-versions: ^(?!.*ci-pr).*$ - - uses: actions/delete-package-versions@v3 + - uses: actions/delete-package-versions@v5 with: package-name: Yardarm.SystemTextJson + package-type: nuget min-versions-to-keep: 30 ignore-versions: ^(?!.*ci-pr).*$ - - uses: actions/delete-package-versions@v3 + - uses: actions/delete-package-versions@v5 + with: + package-name: Yardarm.MicrosoftExtensionsHttp + package-type: nuget + min-versions-to-keep: 30 + ignore-versions: ^(?!.*ci-pr).*$ + - uses: actions/delete-package-versions@v5 with: package-name: Yardarm.CommandLine + package-type: nuget min-versions-to-keep: 30 ignore-versions: ^(?!.*ci-pr).*$ - - uses: actions/delete-package-versions@v3 + - uses: actions/delete-package-versions@v5 with: package-name: Yardarm.Sdk + package-type: nuget min-versions-to-keep: 30 ignore-versions: ^(?!.*ci-pr).*$ diff --git a/GitVersion.yml b/GitVersion.yml index e0d319da..a715848c 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -4,6 +4,11 @@ branches: mode: ContinuousDeployment tag: ci-pr- track-merge-target: true + tags: + regex: tags/(?.+) + tag: '' + source-branches: + - main ignore: sha: [] merge-message-formats: {}