fix: remove 'v' prefix from version for fyne package compatibility #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 | |
| packages: write | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgl1-mesa-dev xorg-dev | |
| - name: Install fyne packaging tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build Linux | |
| run: | | |
| fyne package --name nats-client-linux-amd64 \ | |
| --app-version ${{ steps.get_version.outputs.VERSION }} \ | |
| --app-build ${{ github.run_number }} | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-binary | |
| path: nats-client-linux-amd64 | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Install fyne packaging tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Get the version | |
| id: get_version | |
| run: | | |
| $version = $env:GITHUB_REF -replace 'refs/tags/v','' | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Build Windows | |
| run: | | |
| fyne package --name nats-client-windows-amd64 --app-version ${{ steps.get_version.outputs.VERSION }} --app-build ${{ github.run_number }} | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-binary | |
| path: nats-client-windows-amd64.exe | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Install fyne packaging tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build macOS | |
| env: | |
| GOARCH: ${{ matrix.arch }} | |
| run: | | |
| fyne package --name nats-client-darwin-${{ matrix.arch }} \ | |
| --app-version ${{ steps.get_version.outputs.VERSION }} \ | |
| --app-build ${{ github.run_number }} | |
| # Create zip for easier distribution | |
| zip -r nats-client-darwin-${{ matrix.arch }}.zip nats-client-darwin-${{ matrix.arch }}.app | |
| - name: Upload macOS artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-${{ matrix.arch }}-binary | |
| path: nats-client-darwin-${{ matrix.arch }}.zip | |
| release: | |
| needs: [build-linux, build-windows, build-macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: | | |
| ls -la | |
| find . -name "nats-client-*" -type f | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: NATS Client ${{ steps.get_version.outputs.VERSION }} | |
| body: | | |
| ## 🚀 NATS Client ${{ steps.get_version.outputs.VERSION }} | |
| A modern cross-platform NATS client with intuitive GUI, featuring complete NATS messaging and JetStream support. | |
| ### 📥 Download Instructions / 下载说明 | |
| | Platform | Architecture | File | Size | | |
| |----------|--------------|------|------| | |
| | **Windows** | 64-bit | `nats-client-windows-amd64.exe` | ~15 MB | | |
| | **macOS** | Intel | `nats-client-darwin-amd64.zip` | ~14 MB | | |
| | **macOS** | Apple Silicon | `nats-client-darwin-arm64.zip` | ~14 MB | | |
| | **Linux** | 64-bit | `nats-client-linux-amd64` | ~15 MB | | |
| > **Note**: macOS users may need to right-click → "Open" for first launch due to Gatekeeper. | |
| ### ✨ Key Features / 主要功能 | |
| - 🔗 **Connection Management**: Smart history with auto-save URLs | |
| - 📤 **Message Publishing**: JSON formatting, history support | |
| - 📥 **Message Subscription**: Wildcard patterns, group subscriptions | |
| - 💾 **JetStream Support**: Streams, consumers, retention policies | |
| - 📊 **Real-time Monitoring**: Live filtering, message statistics | |
| - 🛠️ **Cross-platform Config**: Persistent settings across platforms | |
| ### 🎯 Quick Start / 快速开始 | |
| 1. Download the appropriate file for your platform / 下载适合您平台的文件 | |
| 2. Start NATS server: `docker run -p 4222:4222 nats:latest` | |
| 3. Run the client and connect to `nats://localhost:4222` | |
| ### 📚 Documentation / 文档 | |
| - **English**: [README_EN.md](README_EN.md) | [Build Guide](docs/BUILD_EN.md) | |
| - **中文**: [README.md](README.md) | [构建指南](docs/BUILD.md) | |
| files: | | |
| nats-client-* | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} |