From 080f5cb7c72e04cab7a2e3cb7d4c63c422339b69 Mon Sep 17 00:00:00 2001 From: Shivasurya Date: Sat, 27 Apr 2024 18:57:03 -0400 Subject: [PATCH] Added release process --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8c95bf0 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file