name: Build and Release on: workflow_dispatch: push: tags: - "*" jobs: build: runs-on: ubuntu-24.04 strategy: matrix: target: [linux, windows, macos] steps: - name: Maximize build space uses: AdityaGarg8/remove-unwanted-software@v4.1 with: remove-dotnet: "true" remove-android: "true" remove-haskell: "true" remove-codeql: "true" remove-docker-images: "true" remove-cached-tools: "true" remove-swapfile: "true" verbose: "false" - name: Remove unwanted tools # Originally from here: https://github.com/AdityaGarg8/remove-unwanted-software/blob/master/action.yml # Modified to keep llvm. run: | sudo apt-get remove -y '^aspnetcore-.*' > /dev/null sudo apt-get remove -y '^dotnet-.*' > /dev/null sudo apt-get remove -y 'php.*' > /dev/null sudo apt-get remove -y '^mongodb-.*' > /dev/null sudo apt-get remove -y '^mysql-.*' > /dev/null sudo apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null if [[ (${CODENAME} = focal) || (${CODENAME} = jammy) ]]; then sudo apt-get remove -y google-cloud-sdk --fix-missing > /dev/null sudo apt-get remove -y google-cloud-cli --fix-missing > /dev/null fi sudo apt-get autoremove -y > /dev/null sudo apt-get clean > /dev/null - uses: actions/checkout@v2 with: fetch-depth: 1 - name: Set up Go uses: actions/setup-go@v2 with: go-version: "1.23" - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.11" - name: Set up Clang uses: egor-tensin/setup-clang@v1 with: version: latest platform: x64 - name: Check disk space run: df -h - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y msitools p7zip-full aria2 - name: Restore .mozbuild cache uses: actions/cache/restore@v3 with: path: ~/.mozbuild key: mozbuild-${{ matrix.target }} - name: Setup and bootstrap run: | make setup-minimal make mozbootstrap mkdir -p dist - name: List .mozbuild contents run: | ls -R ~/.mozbuild - name: Create swap space run: | sudo fallocate -l 16G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile free -h - name: Build run: python3 ./multibuild.py --target ${{ matrix.target }} --arch x86_64 - name: Save .mozbuild cache uses: actions/cache/save@v3 with: path: ~/.mozbuild key: mozbuild-${{ matrix.target }} - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: CamoufoxBuilds-${{ matrix.target }} path: dist/* release: needs: build permissions: contents: write runs-on: ubuntu-latest steps: - name: Download all artifacts uses: actions/download-artifact@v2 with: path: artifacts - name: Create Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: artifacts/**/* generate_release_notes: true draft: true prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}