Build #24
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 | |
on: workflow_dispatch | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache src | |
id: cache-src | |
uses: actions/upload-artifact@v3 | |
with: | |
name: repo | |
path: ./* | |
build_arm64v8: | |
needs: setup | |
name: build for arm64v8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: repo | |
path: ./ | |
- name: Setup | |
run: | | |
chmod +wr . -R | |
chmod +x ./**/*.sh | |
chmod +x ./**/*.pl | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: linux/arm64 | |
- name: Set up Docker Buildx | |
id: docker_buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build in Docker | |
id: build | |
run: | | |
docker buildx build --platform linux/arm64 --builder ${{ steps.docker_buildx.outputs.name}} -t figma-linux-artefacts-arm:latest --load -f ./docker/Build_artefacts_arm64v8 . | |
mkdir -p ./build/installers | |
docker cp $(docker create figma-linux-artefacts-arm:latest)://usr/src/figma-linux/build/installers/. ./build/installers | |
- name: Cache arm64v8 artifacts | |
id: cache-arm64v8-artifacts | |
uses: nanoufo/action-upload-artifacts-and-release-assets@main | |
with: | |
path: build/installers/figma-linux_*.* | |
build_amd64: | |
runs-on: ubuntu-latest | |
name: build for amd64 | |
needs: setup | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: repo | |
path: ./ | |
- name: Setup | |
run: | | |
chmod +wr . -R | |
chmod +x ./**/*.sh | |
chmod +x ./**/*.pl | |
- name: Build in Docker | |
id: build | |
run: | | |
docker build -t figma-linux-artefacts -f "./docker/Build_artefacts_local" --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) . | |
mkdir -p ./build/installers | |
docker cp $(docker create figma-linux-artefacts:latest)://usr/src/figma-linux/build/installers/. ./build/installers | |
mv ./build/installers/figma-linux_$(cat build/installers/version)_linux_x64.zip ./build/installers/figma-linux_$(cat build/installers/version)_linux_amd64.zip | |
- name: Cache amd64 artifacts | |
id: cache-amd64-artifacts | |
uses: nanoufo/action-upload-artifacts-and-release-assets@main | |
with: | |
path: build/installers/figma-linux_*.* |