Skip to content

add release workflow (#1) #1

add release workflow (#1)

add release workflow (#1) #1

Workflow file for this run

name: release
on:
push:
tags:
- 'release/**'
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
runner: ubuntu-latest
- os: linux-arm64
arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: '1.24.13'
cache: true
cache-dependency-path: '**/go.sum'
- name: Build
run: |
go build -o pprof-linux-${{ matrix.arch }} github.com/google/pprof
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: pprof-linux-${{ matrix.arch }}
path: pprof-linux-${{ matrix.arch }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/pprof-*/pprof-*