mirror of
https://github.com/Morantron/tmux-fingers.git
synced 2026-09-10 07:26:32 -04:00
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
name: Deployment
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- created
|
|
|
|
jobs:
|
|
dist_linux:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: crystallang/crystal:1.19-alpine
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Update Libs
|
|
run: apk add --update --upgrade --no-cache --force-overwrite libxml2-dev yaml-dev yaml-static
|
|
- name: Build
|
|
run: shards build --production --release --static --no-debug
|
|
env:
|
|
WIZARD_INSTALLATION_METHOD: download-binary
|
|
- name: Upload
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./bin/tmux-fingers
|
|
asset_name: tmux-fingers-${{ github.event.release.tag_name }}-linux-x86_64
|
|
asset_content_type: binary/octet-stream
|
|
dist_macos_arm64:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Crystal
|
|
uses: crystal-lang/install-crystal@v1
|
|
with:
|
|
crystal: "1.19"
|
|
- name: Install static lib dependencies
|
|
run: brew install bdw-gc pcre2
|
|
- name: Prepare static libs
|
|
run: |
|
|
mkdir -p bin
|
|
ln -sf $(brew --prefix bdw-gc)/lib/libgc.a bin/libgc.a
|
|
ln -sf $(brew --prefix pcre2)/lib/libpcre2-8.a bin/libpcre2-8.a
|
|
- name: Build
|
|
run: |
|
|
shards build --production --release --no-debug \
|
|
--link-flags="-L $(pwd)/bin $(pwd)/bin/libgc.a $(pwd)/bin/libpcre2-8.a"
|
|
env:
|
|
WIZARD_INSTALLATION_METHOD: download-binary
|
|
- name: Upload
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./bin/tmux-fingers
|
|
asset_name: tmux-fingers-${{ github.event.release.tag_name }}-macos-arm64
|
|
asset_content_type: binary/octet-stream
|
|
dist_homebrew:
|
|
name: Bump Homebrew formula
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: mislav/bump-homebrew-formula-action@v2
|
|
with:
|
|
formula-name: tmux-fingers
|
|
homebrew-tap: morantron/homebrew-tmux-fingers
|
|
env:
|
|
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
|