Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #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: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.6.15, 3.7.15, 3.8.15, 3.9.15, 3.10.8, 3.11.0 ] | |
arch: [ amd64, aarch64 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup QEMU | |
if: matrix.arch != 'amd64' | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: all | |
- name: Setup Docker buildx | |
if: matrix.arch != 'amd64' | |
uses: docker/setup-buildx-action@v1 | |
with: | |
install: true | |
- name: Download docker image | |
run: docker pull dmoj/runtimes-tier1:${{ matrix.arch }}-latest | |
- name: Build python | |
run: | | |
PYTHON_DIR="python$(echo "${{ matrix.python-version }}" | cut -d. -f 1-2)" | |
PYTHON_URL="https://www.python.org/ftp/python/$(perl -e 'shift=~/([\d.]+)/;print$1' "${{ matrix.python-version }}")/Python-${{ matrix.python-version }}.tar.xz" | |
docker run -e ARCH="${{ matrix.arch }}" -e PYTHON_DIR="$PYTHON_DIR" -e PYTHON_URL="$PYTHON_URL" -v "$(pwd):/code" dmoj/runtimes-tier1:${{ matrix.arch }}-latest | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Python ${{ matrix.python-version }} (${{ matrix.arch }}) | |
path: python*.tar.gz | |
release: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: build | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: '*/python*.tar.gz' | |
tag: release-${{ github.sha }} | |
overwrite: true | |
file_glob: true |