Skip to content

Commit 8e92dae

Browse files
authored
Merge pull request #9 from shivasurya/u/shiva/release
Create release process for pathfinder
2 parents bd68e3e + 080f5cb commit 8e92dae

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
goos: [linux, darwin]
14+
goarch: [amd64, arm64]
15+
steps:
16+
- name: Set up Go
17+
uses: actions/setup-go@v3
18+
with:
19+
go-version: '^1.21' # Use the latest Go version
20+
21+
- name: Check out code
22+
uses: actions/checkout@v3
23+
24+
- name: Get dependencies
25+
run: go mod download
26+
27+
- name: Build
28+
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o pathfinder-${{ matrix.goos }}-${{ matrix.goarch }} .
29+
30+
- name: Create Release
31+
id: create_release
32+
uses: actions/create-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ github.ref }}
37+
release_name: Release ${{ github.ref }}
38+
draft: false
39+
prerelease: false
40+
41+
- name: Upload Release Asset
42+
id: upload-release-asset
43+
uses: actions/upload-release-asset@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: ./pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
49+
asset_name: pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
50+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)