From 4869175152e7364e572aa19cc43ee078a200a214 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 26 May 2025 19:53:33 +0200 Subject: [PATCH] adding .github/workflows/release.yml --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5b255d1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release +permissions: + contents: write + +on: + release: + types: [ created ] + +jobs: + compile: + strategy: + fail-fast: false + matrix: + os: [ linux, darwin, windows ] + arch: [ amd64, 386 ] + name: Release - ${{matrix.os}}-${{matrix.arch}} + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.20 + + - name: compile + run: | + GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} make + + - name: Upload release assets + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_name: pinger-${{github.event.release.tag_name}}-${{matrix.os}}-${{matrix.arch}} + asset_path: pinger + asset_content_type: application/octal-stream