From 9667ee5143b30bdbdfb8fff8f50f7d48b811fda1 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Sat, 29 Jun 2024 12:19:30 -0600 Subject: [PATCH] update ci actions --- .github/workflows/ci.yml | 59 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d180f9b..0039986 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,6 @@ name: CI on: [push, pull_request] jobs: - build: runs-on: ${{ matrix.os }} strategy: @@ -11,44 +10,44 @@ jobs: os: [ubuntu-latest, windows-latest] configuration: [Debug, Release] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 - - uses: actions/setup-node@v3 - with: - node-version: lts/* - - name: Build and test - shell: pwsh - run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }} - - name: Publish WASM artifact - uses: actions/upload-artifact@v3 - if: matrix.os == 'windows-latest' && matrix.configuration == 'Release' - with: - name: wasm - path: ./artifacts/wasm/wwwroot + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Build and test + shell: pwsh + run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }} + - name: Publish WASM artifact + uses: actions/upload-artifact@v4 + if: matrix.os == 'windows-latest' && matrix.configuration == 'Release' + with: + name: wasm + path: ./artifacts/wasm/wwwroot per-build-publish: if: github.ref == 'refs/heads/main' needs: [build] runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 - - uses: actions/setup-node@v3 - with: - node-version: lts/* - - run: .\create-version-suffix.ps1 - - run: .\build-and-test.ps1 -configuration Release -notest -versionSuffix ${{ env.VERSION_SUFFIX }} - - run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://nuget.pkg.github.com/ixmilia/index.json -k ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - run: .\create-version-suffix.ps1 + - run: .\build-and-test.ps1 -configuration Release -notest -versionSuffix ${{ env.VERSION_SUFFIX }} + - run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://nuget.pkg.github.com/ixmilia/index.json -k ${{ secrets.GITHUB_TOKEN }} nuget-publish: if: startsWith(github.ref, 'refs/tags/v') needs: [build] runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 - - uses: actions/setup-node@v3 - with: - node-version: lts/* - - run: .\build-and-test.ps1 -configuration Release -notest - - run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - run: .\build-and-test.ps1 -configuration Release -notest + - run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}