Skip to content

build(deps): bump @inquirer/prompts from 6.0.1 to 7.0.0 #172

build(deps): bump @inquirer/prompts from 6.0.1 to 7.0.0

build(deps): bump @inquirer/prompts from 6.0.1 to 7.0.0 #172

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
with:
fetch-depth: 0
fetch-tags: true
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.7.3
install: true
cache: true
experimental: true
- name: Test
run: |
mise use bun@1.1.20
bun install
bun test:ci
bump-version:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.7.3
install: true
cache: true
experimental: true
- run: mise use bun@1.1.20
- run: bun install
- name: Bump version
id: bump
run: |
version=$(echo "${{ github.ref }}" | sed -e s%refs/tags/v%%)
echo "New tag found. Updating package.json to $version..."
jq --indent 4 --arg version "$version" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json
bun biome format --write package.json
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Update package.json version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[skip ci]: Bump version"
commit_options: '--no-verify --signoff'
file_pattern: 'package.json'
repository: .
branch: main
commit_user_name: GitHub Actions Bot # defaults to "github-actions[bot]"
status_options: '--untracked-files=no'
# add_options: '-u'
push_options: '--force'
skip_dirty_check: true
skip_fetch: false
skip_checkout: false
disable_globbing: true
create_branch: false
build:
needs: bump-version
if: always()
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-latest
- os: macos
name: darwin-arm64
target: aarch64-apple-darwin
runs-on: macos-latest
- os: windows
name: win-x64
target: x86_64-ms-windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ contains(github.ref, '-beta') && 'develop' || (startsWith(github.ref, 'refs/tags/') && 'main' || github.ref) }}
- name: Mise Tools install
uses: jdx/mise-action@v2
if: ${{ matrix.os != 'windows' }}
with:
version: 2024.7.3
install: true
cache: true
experimental: true
- run: mise use bun@1.1.20
if: ${{ matrix.os != 'windows' }}
- name: Choco Tools Install
run: |
choco install jq --version 1.7.1
choco install bun --version 1.1.20
if: ${{ matrix.os == 'windows' }}
- run: bun install --ignore-scripts
- 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
./dist/${{ matrix.name }}/scfz --version
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