diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index f5c90a8..a515176 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -40,6 +40,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} + ldflags: -X main.version=${{ github.ref }} overwrite: true md5sum: false sha256sum: false diff --git a/main.go b/main.go index 9e236da..218e5f2 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,8 @@ import ( "github.com/fiatjaf/cli/v3" ) +var version string = "debug" + var app = &cli.Command{ Name: "nak", Suggest: true, @@ -27,6 +29,7 @@ var app = &cli.Command{ bunker, serve, }, + Version: version, Flags: []cli.Flag{ &cli.BoolFlag{ Name: "quiet",