ci: target archs #32
Workflow file for this run
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, Test and Release | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
build: | |
name: build-${{matrix.name}} | |
runs-on: ${{matrix.runs-on}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu | |
name: linux-x64 | |
target: x86_64-unknown-linux-gnu | |
runs-on: ubuntu-latest | |
# - os: ubuntu | |
# name: linux-x64-musl | |
# target: x86_64-unknown-linux-musl | |
# runs-on: ubuntu-latest | |
- os: ubuntu | |
name: linux-arm64 | |
target: aarch64-unknown-linux-gnu | |
runs-on: ubuntu-latest | |
# - os: ubuntu | |
# name: linux-arm64-musl | |
# target: aarch64-unknown-linux-musl | |
# runs-on: ubuntu-latest | |
- os: ubuntu | |
name: linux-armv7 | |
target: armv7-unknown-linux-gnueabi | |
runs-on: ubuntu-latest | |
# - os: ubuntu | |
# name: linux-armv7-musl | |
# target: armv7-unknown-linux-musleabi | |
# runs-on: ubuntu-latest | |
- os: ubuntu | |
name: linux-armv6 | |
target: arm-unknown-linux-gnueabi | |
runs-on: ubuntu-latest | |
# - os: ubuntu | |
# name: linux-armv6-musl | |
# target: arm-unknown-linux-musleabi | |
# runs-on: ubuntu-latest | |
- os: macos | |
name: macos-x64 | |
target: x86_64-apple-darwin | |
runs-on: macos-14 | |
- os: macos | |
name: macos-arm64 | |
target: aarch64-apple-darwin | |
runs-on: macos-14 | |
# - os: macos | |
# name: macos | |
# target: universal2-apple-darwin | |
# runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Mise Tools install | |
uses: jdx/mise-action@v2 | |
with: | |
version: 2024.3.1 | |
install: true | |
cache: true | |
experimental: true | |
- run: bun install | |
- name: Create binary and release files # FIXME: Bun issue with bin path | |
run: | | |
mkdir ./dist | |
bun build ./lib/main.ts --compile --outfile ./dist/scfz-${{ matrix.name }} | |
tar -czvf ./dist/scfz-${{ matrix.name }}.tar.gz ./lib/scfz-${{ matrix.name }} | |
./lib/scfz-${{ matrix.name }} --version | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: scfz-${{matrix.target}} | |
path: | | |
./dist/scfz-*.tar.gz | |
if-no-files-found: error | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 | |
- run: bun install | |
- name: Create changelog | |
run: | | |
bun changelog --file ./dist/changelog.txt --tag $(git tag --list --sort=v:refname | grep -v beta | tail -n 1) | |
cat ./dist/changelog.txt | |
- uses: actions/download-artifact@v4 | |
with: { path: artifacts } | |
- run: ls -la . | |
# - 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 | |
# ./lib/scfz | |
# ./dist/scfz.tar.gz | |
# LICENSE |