ci: tidy up build script

This commit is contained in:
Caelan Sayler
2023-12-29 16:34:11 +00:00
parent 4a695bdd27
commit 1c7eb5e1f4

View File

@@ -1,4 +1,4 @@
name: Build Squirrel name: Build
on: [ push, pull_request ] on: [ push, pull_request ]
@@ -9,13 +9,13 @@ jobs:
os: [macos-latest, windows-latest] os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Print dotnet version
run: dotnet --info
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Print dotnet version
run: dotnet --info
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: | path: |
@@ -39,6 +39,7 @@ jobs:
- name: Install NBGV - name: Install NBGV
run: dotnet tool install -g nbgv run: dotnet tool install -g nbgv
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
continue-on-error: true
- name: Install .Net Coverage - name: Install .Net Coverage
run: dotnet tool install -g dotnet-coverage run: dotnet tool install -g dotnet-coverage
@@ -81,12 +82,6 @@ jobs:
src/Rust/target/release/updatemac src/Rust/target/release/updatemac
src/Rust/target/release/*.exe src/Rust/target/release/*.exe
# - name: Upload Coverage Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: coverage
# path: test/coverage*.xml
- name: Upload Coverage to Codecov - name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
env: env:
@@ -99,6 +94,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build] needs: [build]
steps: steps:
- name: Print dotnet version
run: dotnet --info
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -110,19 +108,6 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-nuget- ${{ runner.os }}-nuget-
# - name: Install .NET 6
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: 6.0.x
# - name: Install .NET 8
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: 8.0.x
- name: Print dotnet version
run: dotnet --info
- name: Download Rust Windows - name: Download Rust Windows
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
@@ -135,12 +120,6 @@ jobs:
name: rust-windows-latest name: rust-windows-latest
path: src/Rust/target/release path: src/Rust/target/release
# - name: Download Coverage Artifacts
# uses: actions/download-artifact@v4
# with:
# name: coverage
# path: ./coverage
- name: Build .NET - name: Build .NET
run: dotnet build -c Release /p:PackRustAssets=true run: dotnet build -c Release /p:PackRustAssets=true
@@ -150,14 +129,6 @@ jobs:
name: packages name: packages
path: build/Release/*.nupkg path: build/Release/*.nupkg
# - name: Upload Coverage to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# with:
# directory: ./coverage
# fail_ci_if_error: true
- name: Publish to GitHub Packages - name: Publish to GitHub Packages
shell: pwsh shell: pwsh
run: dotnet nuget push build/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate run: dotnet nuget push build/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate