Skip to content

exp: adding arm64 linux runner / release #33

exp: adding arm64 linux runner / release

exp: adding arm64 linux runner / release #33

Workflow file for this run

name: Release
on:
push:
branches: [release-build-branch]
workflow_dispatch:
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Based on https://dev.to/eugenebabichenko/automated-multi-platform-releases-with-github-actions-1abg
create_release:
name: Create Release and Provide Upload URL.
runs-on: ubuntu-latest # OS to create release, not for build
outputs:
# This job will provide URL for build jobs to use for uploading assets
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Get short SHA
id: get_sha
run: echo "sha7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v.${{ steps.get_sha.outputs.sha7 }}
release_name: Release v.${{ steps.get_sha.outputs.sha7 }}
draft: false
prerelease: false
build_assets:
name: Build Release Assets
needs: create_release
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: ubuntu-20.04
os: ubuntu-20.04
arch: amd64
- runner: self-hosted
os: ubuntu-22.04
arch: arm64
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.arch }} - ${{ matrix.os }}
- name: Install system dependencies (Ubuntu 20.04)
run: ./scripts/install_deps_ubuntu.sh
if: matrix.os == 'ubuntu-20.04'
- name: Install system dependencies (Ubuntu 22.04)
run: ./scripts/install_deps_ubuntu2204.sh
if: matrix.os == 'ubuntu-22.04'
- name: Install venv dependencies
run: ./scripts/build_venv/build_venv.sh
- name: Create Archive For Release
run: |
ls
tar -czvf venv-${{ matrix.os }}-${{ matrix.arch }}.tar.gz scripts/build_venv/venv/prefix
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: venv-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
asset_path: venv-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
asset_content_type: application/x-tar