v2026.3.31 #83
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Builds a final release version and pushes to nuget.org | |
| # whenever a release is published. | |
| # Requires: secrets.NUGET_API_KEY | |
| name: publish | |
| on: | |
| release: | |
| types: [prereleased, released] | |
| env: | |
| DOTNET_NOLOGO: true | |
| Configuration: Release | |
| PackOnBuild: true | |
| GeneratePackageOnBuild: true | |
| VersionLabel: ${{ github.ref }} | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| MSBUILDTERMINALLOGGER: auto | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🤘 checkout | |
| uses: actions/checkout@v4 | |
| - name: ⚙️ dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: ⏬ download | |
| run: | | |
| mkdir obj | |
| curl https://download-chromium.appspot.com/dl/Win_x64?type=snapshots -L -o obj/win-x64.zip | |
| unzip obj/win-x64.zip -d src/chromium.win-x64 | |
| echo Chromium build https://crrev.com/$(curl --silent https://download-chromium.appspot.com/rev/Win_x64?type=snapshots | grep -oP "\d{6,}") > src/chromium.win-x64/readme.md | |
| curl https://download-chromium.appspot.com/dl/Win?type=snapshots -L -o obj/win-x86.zip | |
| unzip obj/win-x86.zip -d src/chromium.win-x86 | |
| echo Chromium build https://crrev.com/$(curl --silent https://download-chromium.appspot.com/rev/Win?type=snapshots | grep -oP "\d{6,}") > src/chromium.win-x86/readme.md | |
| curl https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots -L -o obj/linux-x64.zip | |
| unzip obj/linux-x64.zip -d src/chromium.linux-x64 | |
| echo Chromium build https://crrev.com/$(curl --silent https://download-chromium.appspot.com/rev/Linux_x64?type=snapshots | grep -oP "\d{6,}") > src/chromium.linux-x64/readme.md | |
| find ./src/*/*/locales/ -type f -name "*.pak" -not -name "en-US.pak" -delete | |
| rm ./src/*/chrome-win/interactive_ui_tests.exe | |
| - name: 🙏 build runtimes | |
| run: dotnet build -m:1 -bl:runtimes.binlog ./src/Runtimes.sln | |
| - name: 🙏 build | |
| run: dotnet build -m:1 -bl:build.binlog | |
| - name: 🐛 logs | |
| uses: actions/upload-artifact@v4 | |
| if: runner.debug && always() | |
| with: | |
| name: logs | |
| path: '*.binlog' | |
| - name: ⬆️ upload | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin/* | |
| test: | |
| needs: build | |
| name: test-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ 'ubuntu-latest', 'windows-latest' ] | |
| steps: | |
| - name: 🤘 checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: ⬇️ artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin | |
| - name: 🧪 test | |
| shell: pwsh | |
| run: | | |
| $fileName = gci -path ./bin -file | where { $_.name -like "chromium.*" } | select -first 1 -ExpandProperty name | |
| $version = $fileName -replace '^chromium\.' -replace '\.nupkg$' | |
| $source = join-path "${{ github.workspace }}" "bin" | |
| dotnet nuget add source $source | |
| dotnet tool install -g dotnet-chromium --version $version | |
| chromium --headless --no-sandbox https://api.ipify.org | |
| push: | |
| needs: test | |
| if: success() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin | |
| - name: ⚙️ dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: 🚀 sleet | |
| env: | |
| SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} | |
| if: env.SLEET_CONNECTION != '' | |
| run: | | |
| dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r) | |
| sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found" | |
| publish: | |
| needs: push | |
| if: success() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⬇️ artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin | |
| - name: 🚀 nuget | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }} | |
| working-directory: bin | |
| run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate |