Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Bump actions/upload-artifact from 3 to 4 #63

Bump actions/upload-artifact from 3 to 4

Bump actions/upload-artifact from 3 to 4 #63

Workflow file for this run

name: build
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x64
lib: lib64
platform: linux/amd64
- arch: ia32
lib: lib
platform: linux/amd64
- arch: arm64
lib: lib64
platform: linux/arm64
- arch: arm
lib: lib
platform: linux/arm64
steps:
- uses: actions/checkout@v4
with:
repository: 'sass/dart-sass'
ref: ${{ startsWith(github.ref, 'refs/tags/') && github.ref || '' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:master # need qemu >= 7.0.0
- name: Compile Protobuf
run: |
docker run --rm -i \
--volume $PWD:$PWD \
--workdir $PWD \
docker.io/library/dart <<'EOF'
set -e
curl -fsSL "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
dart pub get
dart run grinder protobuf
EOF
- name: Build
run: |
docker run --rm -i \
--platform ${{ matrix.platform }} \
--privileged \
--volume $PWD:$PWD \
--workdir $PWD \
ghcr.io/dart-android/dart <<'EOF'
set -e
export DART_SDK=/system/${{ matrix.lib }}/dart
export PATH=$DART_SDK/bin:$PATH
dart pub get
dart run grinder pkg-standalone-android-${{ matrix.arch }}
EOF
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.arch }}
path: build/*.tar.gz
if-no-files-found: error
release:
name: Release
if: github.event.repository.fork == false && startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-x64
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-ia32
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-arm64
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-arm
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
*.tar.gz