Skip to content

Update libp2p version to 0.32.0, golang to 1.20+ (#30) #37

Update libp2p version to 0.32.0, golang to 1.20+ (#30)

Update libp2p version to 0.32.0, golang to 1.20+ (#30) #37

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: Publish binaries
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.20.x
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build
run: |
set -x # Print executed commands
export CGO_ENABLED=0 GOOS GOARCH
for GOOS in linux darwin; do
for GOARCH in amd64 arm64; do
go build -o p2pd-$GOOS-$GOARCH ./p2pd
done
done
- name: Compress binaries
uses: svenstaro/upx-action@v2
with:
files: p2pd-linux-amd64
- name: Compute SHA256 hashes
id: sha256sum
run: |
echo 'OUTPUTS<<EOF' >> $GITHUB_OUTPUT
echo '```' >> $GITHUB_OUTPUT
sha256sum p2pd-* >> $GITHUB_OUTPUT
echo '```' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Publish To Releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.sha256sum.outputs.OUTPUTS }}
file: p2pd-*
file_glob: true
overwrite: true