diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d180f9b..6600984 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 }}