Release v2.1.4 - React web panel + proper build pipeline #18
Workflow file for this run
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: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to release (e.g., 2.0.0)' | |
| required: true | |
| type: string | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: linux-x64 | |
| bun_target: bun-linux-x64 | |
| - os: ubuntu-latest | |
| target: linux-arm64 | |
| bun_target: bun-linux-arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build web panel | |
| run: bun run scripts/build-web.ts | |
| - name: Build binary | |
| run: | | |
| mkdir -p dist | |
| bun build src/cli.ts --compile --target=${{ matrix.bun_target }} --outfile dist/pgforge-${{ matrix.target }} | |
| chmod +x dist/pgforge-${{ matrix.target }} | |
| - name: Create checksum | |
| run: | | |
| cd dist | |
| shasum -a 256 pgforge-${{ matrix.target }} > pgforge-${{ matrix.target }}.sha256 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pgforge-${{ matrix.target }} | |
| path: | | |
| dist/pgforge-${{ matrix.target }} | |
| dist/pgforge-${{ matrix.target }}.sha256 | |
| release: | |
| needs: build | |
| 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: Prepare release files | |
| run: | | |
| mkdir -p dist | |
| for dir in artifacts/pgforge-*/; do | |
| cp "$dir"* dist/ | |
| done | |
| ls -la dist/ | |
| - name: Get version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT | |
| echo "tag_name=v${{ inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create or update tag (for manual dispatch) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -f v${{ inputs.version }} | |
| git push -f origin v${{ inputs.version }} | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag_name }} | |
| name: PgForge v${{ steps.version.outputs.version }} | |
| files: dist/* | |
| body: | | |
| ## Installation | |
| ```bash | |
| curl -fsSL https://raw.githubusercontent.com/LeetCraft/pgforge/main/install.sh | bash | |
| ``` | |
| ## Binaries | |
| | Platform | Binary | | |
| |----------|--------| | |
| | Linux x64 (Intel/AMD) | `pgforge-linux-x64` | | |
| | Linux arm64 | `pgforge-linux-arm64` | | |
| ## Quick Start | |
| ```bash | |
| pgforge setup | |
| pgforge create --name myapp | |
| ``` |