Skip to content

chore: upgrade GitHub Actions to v4 for improved performance and feat… #8

chore: upgrade GitHub Actions to v4 for improved performance and feat…

chore: upgrade GitHub Actions to v4 for improved performance and feat… #8

Workflow file for this run

name: .NET CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
# Cache the built artifacts for use in other workflows
- name: Cache build outputs
uses: actions/cache@v4
with:
path: |
BCFileDecryptor/bin/Release
BCFileDecryptorTests/bin/Release
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
# Upload build artifacts for the test job
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
BCFileDecryptor/bin/Release
BCFileDecryptorTests/bin/Release
retention-days: 1
test:
name: Test
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Download build artifacts from the build job
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ./
# Run tests using the built artifacts
- name: Run tests
run: dotnet test --no-build --verbosity normal --configuration Release