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

Bump actions/download-artifact from 3 to 4 #55

Bump actions/download-artifact from 3 to 4

Bump actions/download-artifact from 3 to 4 #55

Workflow file for this run

name: build
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: x64
platform: linux/amd64
- arch: ia32
platform: linux/386
- arch: arm64
platform: linux/arm64
- arch: arm
platform: linux/arm/v7
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
- 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.arch == 'arm' && 'linux/amd64' || matrix.platform }} \
--volume $PWD:$PWD \
--workdir $PWD \
ghcr.io/dart-musl/dart <<'EOF'
set -e
dart pub get
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
EOF
- name: Fix Dart Runtime
if: matrix.arch == 'arm'
run: |
docker run --rm -i \
--platform ${{ matrix.platform }} \
--volume $PWD:$PWD \
--workdir $PWD \
ghcr.io/dart-musl/dart <<'EOF'
set -e
apk add --no-cache tar
cd build
DART_RUNTIME=$(tar -tzf *.tar.gz --wildcards "*/src/dart")
tar -xzf *.tar.gz
cp $DART_SDK/bin/dart $DART_RUNTIME
tar -czf *.tar.gz "$(dirname "$(dirname "$DART_RUNTIME")")"
EOF
- name: Upload Artifact
uses: actions/upload-artifact@v3
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@v4
with:
name: build-x64
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-ia32
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-arm64
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-arm
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
*.tar.gz