diff --git a/.github/workflows/release-makeosc.yml b/.github/workflows/release-makeosc.yml new file mode 100644 index 0000000..22d2663 --- /dev/null +++ b/.github/workflows/release-makeosc.yml @@ -0,0 +1,49 @@ +name: "release go binaries for multiple os/arch" + +on: + push: + tags: + - 'makeosc/*' + +permissions: + contents: write + packages: write + +jobs: + + create-release: + name: Create makeosc release + runs-on: ubuntu-latest + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + release-multi: + name: create binaries and upload + needs: create-release + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, windows, darwin] + goarch: ["386", amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + steps: + - uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "1.23.1" + project_path: "./cmd/makeosc" + binary_name: "makeosc" + asset_name: makeosc-${{ matrix.goos }}-${{ matrix.goarch }} + release_name: ${{github.ref_name}}