Skip to content

Commit

Permalink
ci: change to v4 actions / upgrade to NodeJS 20 (#94)
Browse files Browse the repository at this point in the history
* ci: update to v4 actions/use NodeJS 16
  See https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
* ci: v4 upload/download improvements don't require custom tar logic anymore
  • Loading branch information
skwasjer authored Feb 7, 2024
1 parent 739bfff commit 920defe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 96 deletions.
32 changes: 0 additions & 32 deletions .github/actions/download-artifact/action.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/actions/upload-artifact/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

steps:
# Setup
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}

Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
fetch-tags: true

- name: Install GitVersion ${{ env.GITVERSION }}
uses: gittools/actions/gitversion/setup@v0.10.2
uses: gittools/actions/gitversion/setup@v0.11.0
with:
versionSpec: ${{ env.GITVERSION }}

- name: Determine version
uses: gittools/actions/gitversion/execute@v0.10.2
uses: gittools/actions/gitversion/execute@v0.11.0
id: gitversion
with:
useConfigFile: true
Expand All @@ -60,7 +60,7 @@ jobs:
msbuild-version-args: ${{ env.msbuild-version-args }}
steps:
# Setup
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}

Expand All @@ -73,7 +73,7 @@ jobs:

# NuGet cache
- name: Restore NuGet global package cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.targets','**/*.props','**/*.csproj') }} # Can't use packages.lock.json yet, because Dependabot does not support it.
Expand All @@ -86,7 +86,7 @@ jobs:
# Build
- run: dotnet build --no-restore -c Release ${{ env.msbuild-version-args }}
- name: Upload build artifacts
uses: ./.github/actions/upload-artifact
uses: actions/upload-artifact@v4
with:
name: build
path: |
Expand All @@ -107,7 +107,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
# Setup
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}

Expand All @@ -118,7 +118,7 @@ jobs:

# Restore build artifacts
- name: Download build artifacts
uses: ./.github/actions/download-artifact
uses: actions/download-artifact@v4
with:
name: build

Expand All @@ -132,7 +132,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}

Expand All @@ -143,7 +143,7 @@ jobs:

# NuGet cache (.NET Framework Reference assemblies are needed for pack)
- name: Restore NuGet global package cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.targets','**/*.props','**/*.csproj') }} # Can't use packages.lock.json yet, because Dependabot does not support it.
Expand All @@ -153,14 +153,14 @@ jobs:

# Restore build artifacts
- name: Download build artifacts
uses: ./.github/actions/download-artifact
uses: actions/download-artifact@v4
with:
name: build

# Pack
- run: dotnet pack --no-restore --no-build -c Release ${{ needs.build.outputs.msbuild-version-args }}
- name: Upload release artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-${{ needs.determine-version.outputs.package-version }}
path: |
Expand All @@ -179,7 +179,7 @@ jobs:
steps:
# Restore release artifacts
- name: Download release artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: release-${{ needs.determine-version.outputs.package-version }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ jobs:
needs: authorize
runs-on: ubuntu-latest
steps:
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-version }}

- run: dotnet --info

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
Expand Down

0 comments on commit 920defe

Please sign in to comment.