Skip to content

⬆️ Bump files with dotnet-file sync #581

⬆️ Bump files with dotnet-file sync

⬆️ Bump files with dotnet-file sync #581

Workflow file for this run

# Builds and runs tests in all three supported OSes
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
name: build
on:
workflow_dispatch:
inputs:
configuration:
type: choice
description: Configuration
options:
- Release
- Debug
push:
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]
env:
DOTNET_NOLOGO: true
PackOnBuild: true
GeneratePackageOnBuild: true
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
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
shopt -s extglob
curl https://download-chromium.appspot.com/dl/Win_x64?type=snapshots -L -o obj/win-x64.zip
unzip -o 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 -o 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 -o 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 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/*.nupkg --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"