Skip to content

Commit

Permalink
Merge pull request #9 from shivasurya/u/shiva/release
Browse files Browse the repository at this point in the history
Create release process for pathfinder
  • Loading branch information
shivasurya authored Apr 27, 2024
2 parents bd68e3e + 080f5cb commit 8e92dae
Showing 1 changed file with 50 additions and 0 deletions.
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

0 comments on commit 8e92dae

Please sign in to comment.