From 796813c805c00d01826a50aa623d936d5f7a1f4c Mon Sep 17 00:00:00 2001 From: lyx-tec Date: Sun, 28 Jun 2026 11:17:16 +0800 Subject: [PATCH] feat: add tag-triggered release workflow for fork --- .github/workflows/release-tag.yml | 125 ++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 .github/workflows/release-tag.yml diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml new file mode 100644 index 0000000000..74bb408dbd --- /dev/null +++ b/.github/workflows/release-tag.yml @@ -0,0 +1,125 @@ +name: Release (Tag Triggered) +run-name: Build ${{ github.ref_name }} +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + workflow_dispatch: +env: + GO_VERSION: "1.25.6" + NODE_VERSION: 22 + NODE_OPTIONS: --max-old-space-size=4096 +jobs: + build: + strategy: + matrix: + include: + - platform: darwin + runner: macos-latest + - platform: linux + runner: ubuntu-latest + - platform: linux + runner: ubuntu-24.04-arm + - platform: windows + runner: windows-latest + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v6 + + - name: Install Linux Build Dependencies + if: matrix.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools + sudo snap install snapcraft --classic --channel=7.x + sudo snap install lxd + sudo lxd init --auto + sudo snap refresh + + - name: Install Zig + if: matrix.platform != 'darwin' + uses: mlugg/setup-zig@v2 + + - name: Install FPM + if: matrix.platform != 'windows' + run: sudo gem install fpm + + - name: Install FPM + if: matrix.platform == 'windows' + run: gem install fpm + + - uses: actions/setup-go@v6 + with: + go-version: ${{env.GO_VERSION}} + cache-dependency-path: | + go.sum + - uses: actions/setup-node@v6 + with: + node-version: ${{env.NODE_VERSION}} + cache: npm + cache-dependency-path: package-lock.json + + - name: Force git deps to HTTPS + run: | + git config --global url.https://github.com/.insteadof ssh://git@github.com/ + git config --global url.https://github.com/.insteadof git@github.com: + + - uses: nick-fields/retry@v4 + name: npm ci + with: + command: npm ci --no-audit --no-fund + retry_on: error + max_attempts: 3 + timeout_minutes: 5 + env: + GIT_ASKPASS: "echo" + GIT_TERMINAL_PROMPT: "0" + + - name: Install Task + uses: arduino/setup-task@v2 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build (${{ matrix.platform }}) + run: task package + env: + USE_SYSTEM_FPM: true + shell: ${{ matrix.platform == 'windows' && 'powershell' || 'bash' }} + + - name: Upload artifacts + uses: actions/upload-artifact@v5 + with: + name: ${{ matrix.runner }} + path: make + + create-release: + runs-on: ubuntu-latest + needs: build + permissions: + contents: write + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: make + merge-multiple: true + + - name: Create draft release + uses: softprops/action-gh-release@v2 + with: + prerelease: ${{ contains(github.ref_name, '-beta') }} + name: Wave Terminal ${{ github.ref_name }} Release + generate_release_notes: true + draft: true + files: | + make/*.zip + make/*.dmg + make/*.exe + make/*.msi + make/*.rpm + make/*.deb + make/*.pacman + make/*.snap + make/*.flatpak + make/*.AppImage