Skip to content

Build binaries using latest yao-pkg/pkg #96

Build binaries using latest yao-pkg/pkg

Build binaries using latest yao-pkg/pkg #96

Workflow file for this run

name: pr
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- name: Install ldid
uses: MOZGIII/install-ldid-action@v1
with:
tag: v2.1.5-procursus6
- name: Build
run: |
yarn install
yarn build
- name: Test
run: |
yarn test
- name: Create binaries
run: |
yarn binary
- name: Rename
run: |
mv astgen-linux-x64 astgen-linux
mv astgen-linux-arm64 astgen-linux-arm
mv astgen-macos-x64 astgen-macos
mv astgen-macos-arm64 astgen-macos-arm
mv astgen-win-x64.exe astgen-win.exe
- name: Run gzexe
run: |
gzexe astgen-linux
rm astgen-linux~
gzexe astgen-linux-arm
rm astgen-linux-arm~
- name: Print size and version
run: |
ls -lh ./astgen*
ASTGEN_VERSION=$(./astgen-linux --version)
echo "ASTGEN_VERSION=$ASTGEN_VERSION" >> $GITHUB_ENV
echo "astgen version is: $ASTGEN_VERSION"
- name: Upload binaries to pre-release
uses: svenstaro/upload-release-action@v2
with:
prerelease: true
overwrite: true
file_glob: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: astgen-*
body: "Pre-release for testing only"
target_commit: ${{ github.head_ref || github.ref_name }}
tag: v${{ env.ASTGEN_VERSION }}