chore(release): bump version to 0.2.1 #4
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*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.artifact }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| artifact: codimd-cli-linux-x64 | |
| - os: ubuntu-24.04-arm | |
| artifact: codimd-cli-linux-arm64 | |
| - os: macos-latest | |
| artifact: codimd-cli-darwin-arm64 | |
| - os: windows-latest | |
| artifact: codimd-cli-windows-x64.exe | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install Zig (OpenTUI native build) | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build standalone binary | |
| run: bun build ./src/cli.ts --compile --outfile dist/${{ matrix.artifact }} | |
| - name: Verify binary runs | |
| shell: bash | |
| run: dist/${{ matrix.artifact }} --help | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: dist/${{ matrix.artifact }} | |
| release: | |
| name: Publish GitHub Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Determine prerelease | |
| id: meta | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| if echo "$TAG" | grep -Eq '(^|[.-])(alpha|beta|rc|pre)[.-]|^.*-pre\.'; then | |
| echo "prerelease=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "prerelease=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| prerelease: ${{ steps.meta.outputs.prerelease == 'true' }} | |
| files: artifacts/** |