Skip to content

chore(deps-dev): update Gemfile #14

chore(deps-dev): update Gemfile

chore(deps-dev): update Gemfile #14

Workflow file for this run

name: Test and build
on:
workflow_call:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.5.14
install: true
cache: true
experimental: true
- name: Test
run: |
bun install
bun test:ci
build:
needs: test
name: build-${{matrix.name}}
runs-on: ${{matrix.runs-on}}
permissions:
contents: write
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-arm64
target: aarch64-unknown-linux-gnu
runs-on: ubuntu-latest
- os: macos
name: darwin-x64
target: x86_64-apple-darwin
runs-on: macos-14
- os: macos
name: darwin-arm64
target: aarch64-apple-darwin
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.5.14
install: true
cache: true
experimental: true
- run: bun install
- name: Bump version
if: startsWith(github.ref, 'refs/tags/')
run: |
version=$(echo ${{ github.ref }} | sed -e s%refs/tags/%%)
echo "New tag found. Updating package.json to $version..."
jq --indent 4 '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json
bun biome format --write package.json
git add package.json
git commit -m "[skip ci]: Bump version $version"
- name: Create binary and release files
run: |
jq -r '.version' package.json
mkdir -p ./dist/${{ matrix.name }}
bun build ./lib/main.ts --compile --outfile ./dist/${{ matrix.name }}/scfz
# FIXME: Bun issue with bin path
./lib/scfz --version
mv ./lib/scfz ./dist/${{ matrix.name }}/scfz
cd ./dist
tar -czvf scfz-${{ matrix.name }}.tar.gz ./${{ matrix.name }}/
cd ..
# TODO: Checksums
- uses: actions/upload-artifact@v4
with:
name: tarball-${{matrix.target}}
path: |
./dist/scfz-*.tar.gz
if-no-files-found: error