Skip to content

v0.1.0

v0.1.0 #21

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
release:
name: Release ${{ matrix.target }}
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
goos: linux
goarch: amd64
archive: zip
- target: x86_64-pc-windows-gnu
goos: windows
goarch: amd64
archive: zip
- target: x86_64-apple-darwin
goos: darwin
goarch: amd64
archive: zip
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.2
- name: Build
run: |
export GOOS=${{ matrix.goos }}
export GOARCH=${{ matrix.goarch }}
go build
if [ "${{ matrix.archive }}" == "zip" ]; then
zip ypd.${{ matrix.target }}.zip ypd
else
tar -czf ypd.${{ matrix.target }}.${{ matrix.archive }} ypd
fi
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./ypd.${{ matrix.target }}.${{ matrix.archive }}
asset_name: ypd-${{ matrix.target }}.${{ matrix.archive }}
asset_content_type: application/octet-stream