Skip to content

ci: arm architectures #28

ci: arm architectures

ci: arm architectures #28

Workflow file for this run

name: Build, Test and Release
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-22.04
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# Run steps on a matrix of 2 arch/distro combinations
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu22.04
- arch: none
distro: none
base_image: armv7/ubuntu_latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.3.1
install: true
cache: true
experimental: true
- name: Test
run: |
bun install
bun test:ci
- name: Create binary and release files # FIXME: Bun issue with bin path
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}/dist:/dist"
setup: |
mkdir -p "${PWD}/dist"
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
apt-get update -q -y
apt-get install -q -y git
;;
esac
env: | # YAML, but pipe character is necessary
artifact_name: scfz-${{ matrix.arch }}
run: |
bun build ./lib/main.ts --compile --outfile ${PWD}/dist/${artifact_name}
tar -czvf ${PWD}/dist/${artifact_name}.tar.gz ${PWD}/lib/${artifact_name}
${PWD}/lib/${artifact_name} --version
- name: Show artifacts
run: |
ls -la ${PWD}/dist
- name: Create Changelog
if: startsWith(github.ref, 'refs/tags/')
run: |
bun changelog --file ./dist/changelog.txt --tag $(git tag --list --sort=v:refname | grep -v beta | tail -n 1)
cat ./dist/changelog.txt
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
prerelease: ${{contains(github.ref, '-beta')}}
body_path: ./dist/changelog.txt
files: | # FIXME: Bun issue with bin path
${PWD}/lib/scfz*
${PWD}/dist/scfz*.tar.gz
LICENSE