Build Electron Builder #17
Workflow file for this run
This file contains 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
name: Build Electron Builder | |
on: | |
workflow_dispatch: | |
inputs: | |
rustupVersion: | |
type: string | |
required: true | |
default: "1.27.1" | |
description: Version of rustup for host rustc | |
hostRustVersion: | |
type: string | |
required: true | |
default: "1.82.0" | |
description: Host rustc version | |
targetRustBranch: | |
type: string | |
required: true | |
default: "beta" | |
description: Target rustc branch | |
gccVersion: | |
type: string | |
required: true | |
default: "14.2.0" | |
description: Gcc version to compile | |
imageTag: | |
type: string | |
required: true | |
default: "electron-v32" | |
description: Tag of the builder image | |
jobs: | |
libgcc: | |
runs-on: self-hosted | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build libgcc | |
uses: docker/build-push-action@v5 | |
with: | |
load: true | |
tags: libgcc:latest | |
file: Dockerfile.libgcc | |
build-args: | | |
GCC_VERSION=${{ inputs.gccVersion }} | |
- name: Extract libgcc Artifact | |
uses: shrink/actions-docker-extract@v3 | |
with: | |
image: libgcc:latest | |
path: /root/build/libgcc.tar.gz | |
destination: dist | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libgcc | |
path: dist/libgcc.tar.gz | |
rustc: | |
runs-on: self-hosted | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build rustc | |
uses: docker/build-push-action@v5 | |
with: | |
load: true | |
tags: rustc:latest | |
file: Dockerfile.rustc | |
build-args: | | |
RUSTUP_VERSION=${{ inputs.rustupVersion }} | |
HOST_RUST_VERSION=${{ inputs.hostRustVersion }} | |
TARGET_RUST_BRANCH=${{ inputs.targetRustBranch }} | |
- name: Extract Artifact | |
uses: shrink/actions-docker-extract@v3 | |
id: extract | |
with: | |
image: rustc:latest | |
path: /root/rust/rustc.tar.gz | |
destination: dist | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rustc | |
path: dist/rustc.tar.gz | |
builder: | |
needs: | |
- libgcc | |
- rustc | |
runs-on: self-hosted | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: . | |
merge-multiple: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Builder Image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: . | |
file: Dockerfile.builder | |
tags: ghcr.io/darkyzhou/electron-builder:${{ inputs.imageTag }} |