Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.21' # Use the latest Go version

- name: Check out code
uses: actions/checkout@v3

- name: Get dependencies
run: go mod download

- name: Build
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o pathfinder-${{ matrix.goos }}-${{ matrix.goarch }} .

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
asset_name: pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
asset_content_type: application/octet-stream