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

38 lines
944 B
YAML

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