diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bc36b41 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: release +on: + push: + tags: + - 'v*' + +jobs: + release: + permissions: + packages: write + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v4 + with: + go-version: '1.22' + - name: Build and release + uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..78d19f2 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,25 @@ +builds: + - id: daemon + binary: gopherxlr + mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath + ldflags: + - -s + - -w + - -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}} + goos: + - linux + goarch: + - amd64 + - arm64 +archives: + - id: daemon + builds: + - daemon + wrap_in_directory: true + files: + - LICENSE + - README.md + - examples/* + - systemd/*