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:
parent
771e1b994a
commit
4869175152
1 changed files with 38 additions and 0 deletions
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue