diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4a902f1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + build: + name: Build ${{ matrix.goos }}-${{ matrix.goarch }} + runs-on: ubuntu-latest + strategy: + matrix: + include: + - goos: linux + goarch: amd64 + - goos: linux + goarch: arm64 + - goos: darwin + goarch: amd64 + - goos: darwin + goarch: arm64 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Build + env: + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + run: | + go build -trimpath -ldflags="-s -w -X main.version=${{ github.ref_name }}" \ + -o dendrite-${{ matrix.goos }}-${{ matrix.goarch }} \ + ./cmd/... + + - uses: actions/upload-artifact@v4 + with: + name: dendrite-${{ matrix.goos }}-${{ matrix.goarch }} + path: dendrite-${{ matrix.goos }}-${{ matrix.goarch }} + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + files: dendrite-* + generate_release_notes: true diff --git a/dendrite b/dendrite index c80b63f..73a4b73 100755 Binary files a/dendrite and b/dendrite differ