Skip to content

docs(general): fixed Jekyll adrs render #26

docs(general): fixed Jekyll adrs render

docs(general): fixed Jekyll adrs render #26

Workflow file for this run

name: Test, Build and Release
on:
push:
branches:
- develop
- main
tags:
- 'v*'
jobs:
test:
uses: ./.github/workflows/test.yaml
build:
needs: test
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-arm64
target: aarch64-unknown-linux-gnu
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
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
run: |
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
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
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: |
mkdir ./dist
bun changelog --file ./dist/changelog.txt --tag $(git for-each-ref --sort=creatordate --format '%(refname:short)' refs/tags | grep -v beta | grep -v $(git describe --tags) | tail -n 1)
cat ./dist/changelog.txt
- uses: actions/download-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
path: ./dist
- name: Update install.sh file
run: scripts/release.sh
if: startsWith(github.ref, 'refs/tags/')
- name: Create Release Draft
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: ./dist/releases/${{github.ref_name}}/*
- run: mv dist/releases/install.sh docs/assets/install.sh
if: startsWith(github.ref, 'refs/tags/')
- name: Update Install Script
uses: stefanzweifel/git-auto-commit-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
commit_message: "[skip-ci]: Updated install script"
commit_options: '--no-verify --signoff'
branch: ${{ contains(github.ref, '-beta') && 'develop' || 'main' }}
file_pattern: 'docs/**'
repository: .
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: true
skip_checkout: true
disable_globbing: true
create_branch: false