diff --git a/.github/workflows/fyshls.yml b/.github/workflows/fyshls.yml index 2aa927a..39c04e0 100644 --- a/.github/workflows/fyshls.yml +++ b/.github/workflows/fyshls.yml @@ -1,3 +1,5 @@ +name: Create fyshls release + on: push: tags: @@ -24,12 +26,12 @@ jobs: - name: Build run: | - CGO_ENABLED=1 go build -o fyshls ./pkg/fyshls + go run ./pkg/fyshls/cmd/install fyshls ./pkg/fyshls - name: Upload Release Asset uses: actions/upload-release-asset@v1 with: - upload_url: ${{ github.event.release.upload_url }} + upload_url: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }} asset_path: fyshls asset_name: fyshls-${{ matrix.os }} asset_content_type: application/octet-stream diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 15d7a31..ee0a604 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -1,4 +1,4 @@ -name: Go Tests +name: Test Go Fysh on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1d73bb..c970654 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# .github/workflows/release.yaml +name: Create go-fysh release on: release: diff --git a/pkg/fyshls/cmd/install/main.go b/pkg/fyshls/cmd/install/main.go index 76022d2..04144ee 100644 --- a/pkg/fyshls/cmd/install/main.go +++ b/pkg/fyshls/cmd/install/main.go @@ -27,6 +27,8 @@ func main() { var cmd *exec.Cmd if *outputFile != "" { cmd = exec.Command("go", "build", "-o", *outputFile, "-ldflags", ldflags) + } else if len(args) == 2 { + cmd = exec.Command("go", "build", "-o", args[0], "-ldflags", ldflags, args[1]) } else if len(args) == 1 { cmd = exec.Command("go", "build", "-o", args[0], "-ldflags", ldflags) } else if len(args) == 0 {