From 7dc9330769bf10ba4b1625599ff9f964e6d31b3a Mon Sep 17 00:00:00 2001 From: xcoding666 <143189598+xcoding666@users.noreply.github.com> Date: Sat, 21 Sep 2024 19:12:51 +0800 Subject: [PATCH 1/3] Delete .github directory --- .github/actions/stage/action.yml | 19 - .github/actions/stage/index.js | 83 ---- .github/actions/stage/package.json | 9 - .github/actions/winget/action.yml | 15 - .github/actions/winget/index.js | 120 ----- .github/actions/winget/package.json | 12 - .github/workflows/main.yml | 731 ---------------------------- 7 files changed, 989 deletions(-) delete mode 100644 .github/actions/stage/action.yml delete mode 100644 .github/actions/stage/index.js delete mode 100644 .github/actions/stage/package.json delete mode 100644 .github/actions/winget/action.yml delete mode 100644 .github/actions/winget/index.js delete mode 100644 .github/actions/winget/package.json delete mode 100644 .github/workflows/main.yml diff --git a/.github/actions/stage/action.yml b/.github/actions/stage/action.yml deleted file mode 100644 index baa7b37e..00000000 --- a/.github/actions/stage/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 'Stage' -description: 'Stage build' -inputs: - finished: - description: If a previous stage already finished the build, the stage will set all output variables to the input ones and exit - required: true - from_artifact: - description: If a previous stage already uploaded build artifacts, the stage will resume building - required: true - x86: - description: Build x86 binary - required: false - default: false -outputs: - finished: - description: If a previous stage already finished the build, the stage will set all output variables to the input ones and exit -runs: - using: 'node16' - main: 'index.js' \ No newline at end of file diff --git a/.github/actions/stage/index.js b/.github/actions/stage/index.js deleted file mode 100644 index 97fcf929..00000000 --- a/.github/actions/stage/index.js +++ /dev/null @@ -1,83 +0,0 @@ -const core = require('@actions/core'); -const io = require('@actions/io'); -const exec = require('@actions/exec'); -const artifact = require('@actions/artifact'); -const glob = require('@actions/glob'); - -async function run() { - process.on('SIGINT', function() { - }) - const finished = core.getBooleanInput('finished', {required: true}); - const from_artifact = core.getBooleanInput('from_artifact', {required: true}); - const x86 = core.getBooleanInput('x86', {required: false}) - console.log(`finished: ${finished}, artifact: ${from_artifact}`); - if (finished) { - core.setOutput('finished', true); - return; - } - - const artifactClient = artifact.create(); - const artifactName = x86 ? 'build-artifact-x86' : 'build-artifact'; - - if (from_artifact) { - await artifactClient.downloadArtifact(artifactName, 'C:\\ungoogled-chromium-windows\\build'); - await exec.exec('7z', ['x', 'C:\\ungoogled-chromium-windows\\build\\artifacts.zip', - '-oC:\\ungoogled-chromium-windows\\build', '-y']); - await io.rmRF('C:\\ungoogled-chromium-windows\\build\\artifacts.zip'); - } - - const args = ['build.py', '--ci'] - if (x86) - args.push('--x86') - await exec.exec('python', ['-m', 'pip', 'install', 'httplib2'], { - cwd: 'C:\\ungoogled-chromium-windows', - ignoreReturnCode: true - }); - const retCode = await exec.exec('python', args, { - cwd: 'C:\\ungoogled-chromium-windows', - ignoreReturnCode: true - }); - if (retCode === 0) { - core.setOutput('finished', true); - const globber = await glob.create('C:\\ungoogled-chromium-windows\\build\\ungoogled-chromium*', - {matchDirectories: false}); - let packageList = await globber.glob(); - packageList = await Promise.all(packageList.map(async x => { - const part1 = x.substring(0, x.length - 4); - const part2 = x86 ? '_x86' : '_x64'; - const part3 = x.substring(x.length - 4, x.length); - const newPath = part1 + part2 + part3; - await io.mv(x, newPath); - return newPath; - })); - for (let i = 0; i < 5; ++i) { - try { - await artifactClient.uploadArtifact(x86 ? 'chromium-x86' : 'chromium', packageList, - 'C:\\ungoogled-chromium-windows\\build', {retentionDays: 3}); - break; - } catch (e) { - console.error(`Upload artifact failed: ${e}`); - // Wait 10 seconds between the attempts - await new Promise(r => setTimeout(r, 10000)); - } - } - } else { - await new Promise(r => setTimeout(r, 5000)); - await exec.exec('7z', ['a', '-tzip', 'C:\\ungoogled-chromium-windows\\artifacts.zip', - 'C:\\ungoogled-chromium-windows\\build\\src', '-mx=3', '-mtc=on'], {ignoreReturnCode: true}); - for (let i = 0; i < 5; ++i) { - try { - await artifactClient.uploadArtifact(artifactName, ['C:\\ungoogled-chromium-windows\\artifacts.zip'], - 'C:\\ungoogled-chromium-windows', {retentionDays: 3}); - break; - } catch (e) { - console.error(`Upload artifact failed: ${e}`); - // Wait 10 seconds between the attempts - await new Promise(r => setTimeout(r, 10000)); - } - } - core.setOutput('finished', false); - } -} - -run().catch(err => core.setFailed(err.message)); \ No newline at end of file diff --git a/.github/actions/stage/package.json b/.github/actions/stage/package.json deleted file mode 100644 index c68868ef..00000000 --- a/.github/actions/stage/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "dependencies": { - "@actions/artifact": "^1.1.0", - "@actions/core": "^1.8.2", - "@actions/exec": "^1.1.1", - "@actions/glob": "^0.3.0", - "@actions/io": "^1.1.2" - } -} \ No newline at end of file diff --git a/.github/actions/winget/action.yml b/.github/actions/winget/action.yml deleted file mode 100644 index 87642fbd..00000000 --- a/.github/actions/winget/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'winget' -description: 'Release to winget repository' -inputs: - token: - description: GitHub Personal Access Token - required: true - version: - description: New version - required: true - assets: - description: Artifact assets - required: true -runs: - using: 'node16' - main: 'index.js' \ No newline at end of file diff --git a/.github/actions/winget/index.js b/.github/actions/winget/index.js deleted file mode 100644 index 552d2a6c..00000000 --- a/.github/actions/winget/index.js +++ /dev/null @@ -1,120 +0,0 @@ -const yaml = require('js-yaml'); -const exec = require('@actions/exec'); -const core = require("@actions/core"); -const glob = require('@actions/glob'); -const path = require('path'); -const compareVersions = require('compare-versions'); -const fs = require('fs/promises'); -const fsSync = require('fs'); -const io = require('@actions/io'); -const crypto = require('crypto'); -const { https } = require('follow-redirects'); - -async function run() { - const token = core.getInput('token', { - required: true, - trimWhitespace: true - }); - let newVersion = core.getInput('version', { - required: true, - trimWhitespace: true - }); - const idx = newVersion.lastIndexOf('-'); - if (idx !== -1) - newVersion = newVersion.substr(0, idx); - const assets = JSON.parse(core.getInput('assets', { - required: true, - })); - let x86Url, x64Url; - for (const data of assets) { - if (data.browser_download_url.endsWith('.exe')) { - if (data.browser_download_url.includes('x86')) - x86Url = data.browser_download_url; - else - x64Url = data.browser_download_url; - } - } - - await syncRepo(token); - const globber = await glob.create('.\\winget-pkgs\\manifests\\e\\eloston\\ungoogled-chromium\\*', {matchDirectories: true, implicitDescendants: false}); - const pathList = await globber.glob(); - const ucPath = path.dirname(pathList[0]); - const versionList = pathList.map(x => path.basename(x)); - versionList.sort(compareVersions); - const latestVersion = versionList[versionList.length - 1]; - const latestVersionPath = path.join(ucPath, latestVersion); - const newVersionPath = path.join(ucPath, newVersion); - try { - await io.mkdirP(newVersionPath); - } catch (e) { - } - - await updateInstaller(latestVersionPath, newVersionPath, latestVersion, newVersion, x86Url, x64Url); - await replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, 'eloston.ungoogled-chromium.locale.en-US.yaml'); - await replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, 'eloston.ungoogled-chromium.yaml'); - - await new Promise((resolve, reject) => { - const file = fsSync.createWriteStream('wingetcreate.exe'); - https.get('https://aka.ms/wingetcreate/latest', resp => { - resp.pipe(file); - file.on('finish', () => { - file.close(); - resolve(); - }); - }).on('error', reject); - }); - await exec.exec('.\\wingetcreate.exe', ['submit', '-t', token, newVersionPath]); -} - -async function replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, fileName) { - const content = await fs.readFile(path.join(latestVersionPath, fileName), {encoding: 'utf-8'}); - const newContent = content.replaceAll(latestVersion, newVersion); - await fs.writeFile(path.join(newVersionPath, fileName), newContent, {encoding: 'utf-8'}); -} - -async function updateInstaller(latestVersionPath, newVersionPath, latestVersion, newVersion, x86Url, x64Url) { - const x86Hash = await calculateSHA256(x86Url); - const x64Hash = await calculateSHA256(x64Url); - const content = await fs.readFile(path.join(latestVersionPath, 'eloston.ungoogled-chromium.installer.yaml'), {encoding: 'utf-8'}); - const data = yaml.load(content); - let oldX86Url, oldX64Url, oldX86Hash, oldX64Hash; - for (const installer of data.Installers) { - if (installer.Architecture === 'x86') { - oldX86Url = installer.InstallerUrl; - oldX86Hash = installer.InstallerSha256; - } else { - oldX64Url = installer.InstallerUrl; - oldX64Hash = installer.InstallerSha256; - } - } - - const newContent = content - .replaceAll(`PackageVersion: ${data.PackageVersion}`, `PackageVersion: ${newVersion}`) - .replaceAll(`ReleaseDate: ${data.ReleaseDate}`, `ReleaseDate: ${new Date().toLocaleDateString('en-CA')}`) - .replaceAll(oldX86Url, x86Url) - .replaceAll(oldX86Hash, x86Hash) - .replaceAll(oldX64Url, x64Url) - .replaceAll(oldX64Hash, x64Hash); - - await fs.writeFile(path.join(newVersionPath, 'eloston.ungoogled-chromium.installer.yaml'), newContent, {encoding: 'utf-8'}); -} - -function calculateSHA256(url) { - const hash = crypto.createHash('sha256'); - return new Promise((resolve, reject) => { - https.get(url, resp => { - resp.on('data', chunk => hash.update(chunk)); - resp.on('end', () => resolve(hash.digest('hex').toUpperCase())); - }).on('error', reject); - }); -} - -async function syncRepo(token) { - await exec.exec('git', ['clone', `https://x-access-token:${token}@github.com/Nifury/winget-pkgs.git`]); - await exec.exec('git', ['remote', 'add', 'upstream', 'https://github.com/microsoft/winget-pkgs.git'], {cwd: '.\\winget-pkgs'}); - await exec.exec('git', ['fetch', 'upstream', 'master'], {cwd: '.\\winget-pkgs'}); - await exec.exec('git', ['reset', '--hard', 'upstream/master'], {cwd: '.\\winget-pkgs'}); - await exec.exec('git', ['push', 'origin', 'master', '--force'], {cwd: '.\\winget-pkgs'}); -} - -run().catch(err => core.setFailed(err.message)); \ No newline at end of file diff --git a/.github/actions/winget/package.json b/.github/actions/winget/package.json deleted file mode 100644 index 6b319d1d..00000000 --- a/.github/actions/winget/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "dependencies": { - "@actions/artifact": "^1.1.0", - "@actions/core": "^1.8.2", - "@actions/exec": "^1.1.1", - "@actions/glob": "^0.3.0", - "@actions/io": "^1.1.2", - "js-yaml": "^4.1.0", - "compare-versions": "^4.1.3", - "follow-redirects": "^1.15.1" - } -} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 024a78ec..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,731 +0,0 @@ -name: CI -on: - push: - tags: - - '*' -jobs: - build-1: - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: false - from_artifact: false - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-2: - needs: build-1 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-3: - needs: build-2 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-4: - needs: build-3 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-5: - needs: build-4 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-6: - needs: build-5 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-7: - needs: build-6 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-8: - needs: build-7 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-9: - needs: build-8 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-10: - needs: build-9 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-11: - needs: build-10 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-12: - needs: build-11 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-13: - needs: build-12 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-14: - needs: build-13 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-15: - needs: build-14 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-16: - needs: build-15 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - - build-x86-1: - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: false - from_artifact: false - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-2: - needs: build-x86-1 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-3: - needs: build-x86-2 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-4: - needs: build-x86-3 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-5: - needs: build-x86-4 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-6: - needs: build-x86-5 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-7: - needs: build-x86-6 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-8: - needs: build-x86-7 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-9: - needs: build-x86-8 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-10: - needs: build-x86-9 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-11: - needs: build-x86-10 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-12: - needs: build-x86-11 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-13: - needs: build-x86-12 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-14: - needs: build-x86-13 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-15: - needs: build-x86-14 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - build-x86-16: - needs: build-x86-15 - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Init - run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/stage - - name: Run Stage - id: stage - uses: ./.github/actions/stage - with: - finished: ${{ join(needs.*.outputs.finished) }} - from_artifact: true - x86: true - outputs: - finished: ${{ steps.stage.outputs.finished }} - - publish-release: - needs: [build-16, build-x86-16] - runs-on: ubuntu-latest - steps: - - name: Download package - uses: actions/download-artifact@v3 - with: - name: chromium - - name: Download x86 package - uses: actions/download-artifact@v3 - with: - name: chromium-x86 - - name: Publish release - id: publish - uses: softprops/action-gh-release@v1 - with: - fail_on_unmatched_files: true - files: | - ungoogled-chromium* - outputs: - assets: ${{ steps.publish.outputs.assets }} - publish-winget: - needs: publish-release - runs-on: windows-2022 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Stage - run: npm install - working-directory: ./.github/actions/winget - - name: Run Stage - id: stage - uses: ./.github/actions/winget - with: - token: ${{ secrets.PAT }} - version: ${{ github.ref_name }} - assets: ${{ needs.publish-release.outputs.assets }} From f0bcf1e05012e3e648947047d8a420c08259827e Mon Sep 17 00:00:00 2001 From: xcoding666 <143189598+xcoding666@users.noreply.github.com> Date: Sat, 21 Sep 2024 19:13:12 +0800 Subject: [PATCH 2/3] Create main.yml --- .github/workflows/main.yml | 732 +++++++++++++++++++++++++++++++++++++ 1 file changed, 732 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..36dad603 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,732 @@ + +name: CI +on: + push: + tags: + - '*' +jobs: + build-1: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: false + from_artifact: false + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-2: + needs: build-1 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-3: + needs: build-2 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-4: + needs: build-3 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-5: + needs: build-4 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-6: + needs: build-5 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-7: + needs: build-6 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-8: + needs: build-7 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-9: + needs: build-8 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-10: + needs: build-9 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-11: + needs: build-10 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-12: + needs: build-11 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-13: + needs: build-12 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-14: + needs: build-13 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-15: + needs: build-14 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-16: + needs: build-15 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + + build-x86-1: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: false + from_artifact: false + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-2: + needs: build-x86-1 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-3: + needs: build-x86-2 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-4: + needs: build-x86-3 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-5: + needs: build-x86-4 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-6: + needs: build-x86-5 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-7: + needs: build-x86-6 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-8: + needs: build-x86-7 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-9: + needs: build-x86-8 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-10: + needs: build-x86-9 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-11: + needs: build-x86-10 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-12: + needs: build-x86-11 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-13: + needs: build-x86-12 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-14: + needs: build-x86-13 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-15: + needs: build-x86-14 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-16: + needs: build-x86-15 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + + publish-release: + needs: [build-16, build-x86-16] + runs-on: ubuntu-latest + steps: + - name: Download package + uses: actions/download-artifact@v3 + with: + name: chromium + - name: Download x86 package + uses: actions/download-artifact@v3 + with: + name: chromium-x86 + - name: Publish release + id: publish + uses: softprops/action-gh-release@v1 + with: + fail_on_unmatched_files: true + files: | + ungoogled-chromium* + outputs: + assets: ${{ steps.publish.outputs.assets }} + publish-winget: + needs: publish-release + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/winget + - name: Run Stage + id: stage + uses: ./.github/actions/winget + with: + token: ${{ secrets.PAT }} + version: ${{ github.ref_name }} + assets: ${{ needs.publish-release.outputs.assets }} From c34c4d67964c220dc70f06006d786e3151548e02 Mon Sep 17 00:00:00 2001 From: xcoding666 <143189598+xcoding666@users.noreply.github.com> Date: Sat, 21 Sep 2024 19:15:29 +0800 Subject: [PATCH 3/3] Create deploychrome --- .github/workflows/deploychrome | 732 +++++++++++++++++++++++++++++++++ 1 file changed, 732 insertions(+) create mode 100644 .github/workflows/deploychrome diff --git a/.github/workflows/deploychrome b/.github/workflows/deploychrome new file mode 100644 index 00000000..36dad603 --- /dev/null +++ b/.github/workflows/deploychrome @@ -0,0 +1,732 @@ + +name: CI +on: + push: + tags: + - '*' +jobs: + build-1: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: false + from_artifact: false + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-2: + needs: build-1 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-3: + needs: build-2 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-4: + needs: build-3 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-5: + needs: build-4 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-6: + needs: build-5 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-7: + needs: build-6 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-8: + needs: build-7 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-9: + needs: build-8 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-10: + needs: build-9 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-11: + needs: build-10 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-12: + needs: build-11 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-13: + needs: build-12 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-14: + needs: build-13 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-15: + needs: build-14 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-16: + needs: build-15 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + + build-x86-1: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: false + from_artifact: false + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-2: + needs: build-x86-1 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-3: + needs: build-x86-2 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-4: + needs: build-x86-3 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-5: + needs: build-x86-4 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-6: + needs: build-x86-5 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-7: + needs: build-x86-6 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-8: + needs: build-x86-7 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-9: + needs: build-x86-8 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-10: + needs: build-x86-9 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-11: + needs: build-x86-10 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-12: + needs: build-x86-11 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-13: + needs: build-x86-12 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-14: + needs: build-x86-13 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-15: + needs: build-x86-14 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + build-x86-16: + needs: build-x86-15 + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Init + run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/stage + - name: Run Stage + id: stage + uses: ./.github/actions/stage + with: + finished: ${{ join(needs.*.outputs.finished) }} + from_artifact: true + x86: true + outputs: + finished: ${{ steps.stage.outputs.finished }} + + publish-release: + needs: [build-16, build-x86-16] + runs-on: ubuntu-latest + steps: + - name: Download package + uses: actions/download-artifact@v3 + with: + name: chromium + - name: Download x86 package + uses: actions/download-artifact@v3 + with: + name: chromium-x86 + - name: Publish release + id: publish + uses: softprops/action-gh-release@v1 + with: + fail_on_unmatched_files: true + files: | + ungoogled-chromium* + outputs: + assets: ${{ steps.publish.outputs.assets }} + publish-winget: + needs: publish-release + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Stage + run: npm install + working-directory: ./.github/actions/winget + - name: Run Stage + id: stage + uses: ./.github/actions/winget + with: + token: ${{ secrets.PAT }} + version: ${{ github.ref_name }} + assets: ${{ needs.publish-release.outputs.assets }}