I'm trying to build my go project with github action and releasing it on my own repository. As mentioned Go Release Binaries, I wrote my own .yml file but I got error on building flow.
name: Release API binary
on:
push:
tags:
- "*"
jobs:
build:
name: GO API build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64, arm64]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Setup go and release
uses: wangyoucao577/go-release-action@v1.34
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./api"
binary_name: "flying-server"
The project directory is like this:
-> Project root
--> api
---> main.go
---> go.mod
---> go.sum
My error on github action is just like this
Additional Note: I tried to create a tag version with
git tag v0.0.13
then pushed it
git push origin v0.0.13
Based on the procedure above, I want to build a Go project and release it on the repository. I searched for this error, but I could not understand where the problem was.