name: Release Binary on: push: tags: - 'v*' jobs: build: strategy: matrix: goos: ['linux', 'darwin', 'windows'] goarch: ['amd64', 'arm64'] runs-on: ubuntu-latest defaults: run: working-directory: plugins/pmail_telegram_push steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.26.6' - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '24' - name: Set up pnpm uses: pnpm/action-setup@v4 with: version: '10' run_install: false standalone: true - name: Download dependencies run: | pnpm install --frozen-lockfile go mod tidy go mod download - name: Build binary run: | pnpm build mkdir -p ../../out/plugins if [[ "${{ matrix.goos }}" = "windows" ]]; then go build -o ../../out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe -ldflags="-s -w" else go build -o ../../out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }} -ldflags="-s -w" fi env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} CGO_ENABLED: 0 - name: Publish Release uses: ncipollo/release-action@v1 with: allowUpdates: true artifactErrorsFailBuild: true artifacts: 'out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}*' commit: ${{ github.sha }} draft: false prerelease: false token: ${{ secrets.GITHUB_TOKEN }}