Merge pull request #40 from sigilante/claude/goth-language-overview-f… #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| tags: | |
| - 'v*' | |
| # Skip builds for docs-only or examples-only changes | |
| # The "latest" release will still point to the most recent binary | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'examples/**' | |
| - 'benchmark/**' | |
| - '*.md' | |
| - '.gitignore' | |
| - 'jupyter/**' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-release: | |
| name: Build Release (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| artifact: goth-linux-x86_64 | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact: goth-macos-arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build release binary | |
| working-directory: crates | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Run tests | |
| working-directory: crates | |
| run: cargo test --workspace | |
| - name: Package binary | |
| run: | | |
| mkdir -p dist | |
| cp crates/target/${{ matrix.target }}/release/goth dist/ | |
| cp README.md dist/ 2>/dev/null || true | |
| cp LICENSE dist/ 2>/dev/null || true | |
| cd dist && tar -czvf ../${{ matrix.artifact }}.tar.gz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.tar.gz | |
| create-release: | |
| name: Create GitHub Release | |
| needs: build-release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Tagged Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: artifacts/**/*.tar.gz | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update Latest Release | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: latest | |
| name: Latest Build | |
| files: artifacts/**/*.tar.gz | |
| body: | | |
| Automated build from master branch. | |
| **Commit:** ${{ github.sha }} | |
| **Date:** ${{ github.event.head_commit.timestamp }} | |
| ## Installation | |
| ```bash | |
| # Linux x86_64 | |
| curl -L https://github.com/${{ github.repository }}/releases/download/latest/goth-linux-x86_64.tar.gz | tar xz | |
| # macOS ARM64 (M1/M2/M3) | |
| curl -L https://github.com/${{ github.repository }}/releases/download/latest/goth-macos-arm64.tar.gz | tar xz | |
| ``` | |
| ## Usage for LLMs | |
| See [CLAUDE-SKILLS.md](docs/CLAUDE-SKILLS.md) for LLM code generation guidance. | |
| ```bash | |
| # Run a Goth program | |
| ./goth program.goth arg1 arg2 | |
| # Run from JSON AST | |
| ./goth --from-json program.json arg1 | |
| # Generate JSON AST from Goth | |
| ./goth --to-json program.goth | |
| ``` | |
| draft: false | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |