1
0
Fork 0
mirror of https://github.com/pnx/pinger.git synced 2026-06-16 03:24:54 +02:00

adding .github/workflows/release.yml

This commit is contained in:
Henrik Hautakoski 2025-05-26 19:53:33 +02:00
parent 771e1b994a
commit 4869175152

38
.github/workflows/release.yml vendored Normal file
View file

@ -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