Skip to content

Commit

Permalink
Maybe this time the action will run.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoseley committed Jan 31, 2025
1 parent 30958f6 commit a5185d7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/build-cli-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ name: "🎁 Build CLI Binary"

on:
push:
branches:
- main
branches: [main]
paths:
- packages/gensx-cli/**
- "packages/gensx-cli/**/*"
pull_request:
branches:
- main
branches: [main]
paths:
- packages/gensx-cli/**
paths-ignore:
- "**.md"
- "packages/gensx-cli/**/*"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -41,17 +37,24 @@ jobs:
with:
version: 20.x

- name: Extract Version from Package.json
- name: Extract Version from Package.json for main
if: github.ref == 'refs/heads/main'
run: |
VERSION=$(jq -r '.version' packages/gensx-cli/package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Extract Version from Package.json for CI
if: github.ref != 'refs/heads/main'
run: |
VERSION=$(jq -r '.version' packages/gensx-cli/package.json)
echo "VERSION=$VERSION-${{ github.ref_name }}" >> $GITHUB_ENV
- name: Build CLI
run: pnpm build
working-directory: packages/gensx-cli

- name: Building...
run: TARGET=${{ matrix.target }} pnpm pkg
run: TARGET=${{ matrix.target }} pnpm run package
working-directory: packages/gensx-cli

- name: Prepare content...
Expand Down Expand Up @@ -85,7 +88,7 @@ jobs:
cp ${{ matrix.target }}.${{ env._EXT }} gensx_${{ env.VERSION }}_${{ matrix.target }}.${{ env._EXT }}
- name: Uploading...
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2.0.8
with:
tag_name: ${{ env.VERSION }}
Expand Down

0 comments on commit a5185d7

Please sign in to comment.