diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cef862f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +--- + name: release go + on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + + jobs: + binary: + strategy: + matrix: + arch: [arm, arm64, amd64, "386"] + os: [linux, darwin, freebsd, windows] + exclude: + - os: darwin + arch: arm + - os: darwin + arch: "386" + + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Build and publish binary artifact to GitHub + id: build-and-release-binary + uses: wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.os }} + goarch: ${{ matrix.arch }} + goversion: 1.22.4 + project_path: . + binary_name: item-gen + pre_command: export CGO_ENABLED=0 + ldflags: ${{ matrix.ldflags }} + sha256sum: true + md5sum: false + asset_name: "item-gen-${{matrix.os}}-${{matrix.arch}}" + compress_assets: "OFF" + \ No newline at end of file