From c147b9ccc0cf56b0a6d407e90b109129cc301ac4 Mon Sep 17 00:00:00 2001 From: slurdge Date: Thu, 16 Mar 2023 12:06:45 +0100 Subject: [PATCH] feat: try to have a v in releases --- .github/workflows/build.yml | 8 ++-- .github/workflows/release-please.yml | 1 + CHANGELOG.md | 58 ++++++++++++++-------------- cmd/version.go | 3 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f53e376..a672fa5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,16 +39,16 @@ jobs: - name: Get version id: vars run: | - echo ::set-output name=BUILD_DATE::$(date +'%Y%m%d%H%M%S') - echo ::set-output name=GIT_COMMIT::$(git rev-parse HEAD) - echo ::set-output name=GIT_TAG::$(git describe --tags --abbrev=0) + echo "BUILD_DATE=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV + echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV - name: Build run: >- python3 gox.py -osarch="linux/386 linux/amd64 linux/arm linux/arm64 darwin/amd64 windows/amd64 windows/386" -output "build/{{.Dir}}_{{.OS}}_{{.Arch}}" - -ldflags "-w -s -X github.com/slurdge/goeland/version.GitCommit=${GIT_COMMIT} -X github.com/slurdge/goeland/version.BuildDate=${BUILD_DATE} -X github.com/slurdge/goeland/internal/goeland/fetch.clientID=${IMGUR_CLIENT_ID}" + -ldflags "-w -s -X github.com/slurdge/goeland/version.GitCommit=${{ env.GIT_COMMIT }} -X github.com/slurdge/goeland/version.BuildDate=${{ env.BUILD_DATE }} -X github.com/slurdge/goeland/internal/goeland/fetch.clientID=${IMGUR_CLIENT_ID}" - name: Run UPX uses: crazy-max/ghaction-upx@v2 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 12ed3d9..1cba059 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -15,4 +15,5 @@ jobs: release-type: go package-name: release-please-action include-v-in-tag: true + changelog-notes-type: github token: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 088f6eb..bd7271d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,39 +1,39 @@ # Changelog -## [0.13.0](https://github.com/slurdge/goeland/compare/v0.12.3...v0.13.0) (2023-01-18) - - -### Features - -* allow insecure feed location ([71091b6](https://github.com/slurdge/goeland/commit/71091b66a9fab0ea6767c87f91845096d859f3ea)) - - -### Bug Fixes - -* prevent merges to have cycles and infinite recursion fixes [#100](https://github.com/slurdge/goeland/issues/100) ([8b10526](https://github.com/slurdge/goeland/commit/8b10526f95e652e46c16e8eaf53cf3181c475834)) - -## [0.12.3](https://github.com/slurdge/goeland/compare/v0.12.2...v0.12.3) (2022-11-16) - - -### Bug Fixes - -* another try for releases to trigger tag building ([3ff35c9](https://github.com/slurdge/goeland/commit/3ff35c92695d1fa8404ed74db37ec774cd0d2a9b)) - -## [0.12.2](https://github.com/slurdge/goeland/compare/v0.12.1...v0.12.2) (2022-11-16) - - -### Bug Fixes - -* try to fix workflow run with release please ([933c982](https://github.com/slurdge/goeland/commit/933c982edda74882a4c90f3234987e8b4eb16aff)) - -## [0.12.1](https://github.com/slurdge/goeland/compare/v0.12.0...v0.12.1) (2022-11-15) +## [v0.13.0](https://github.com/slurdge/goeland/compare/v0.12.3...v0.13.0) (2023-01-18) + + +### Features + +* allow insecure feed location ([71091b6](https://github.com/slurdge/goeland/commit/71091b66a9fab0ea6767c87f91845096d859f3ea)) + + +### Bug Fixes + +* prevent merges to have cycles and infinite recursion fixes [#100](https://github.com/slurdge/goeland/issues/100) ([8b10526](https://github.com/slurdge/goeland/commit/8b10526f95e652e46c16e8eaf53cf3181c475834)) + +## [v0.12.3](https://github.com/slurdge/goeland/compare/v0.12.2...v0.12.3) (2022-11-16) + + +### Bug Fixes + +* another try for releases to trigger tag building ([3ff35c9](https://github.com/slurdge/goeland/commit/3ff35c92695d1fa8404ed74db37ec774cd0d2a9b)) + +## [v0.12.2](https://github.com/slurdge/goeland/compare/v0.12.1...v0.12.2) (2022-11-16) + + +### Bug Fixes + +* try to fix workflow run with release please ([933c982](https://github.com/slurdge/goeland/commit/933c982edda74882a4c90f3234987e8b4eb16aff)) + +## [v0.12.1](https://github.com/slurdge/goeland/compare/v0.12.0...v0.12.1) (2022-11-15) ### Bug Fixes * default to SSLTLS only on port 465 ([1bbe563](https://github.com/slurdge/goeland/commit/1bbe563c0492c298dc3ac054ffc0c5832608fc67)) -## [0.12.0](https://github.com/slurdge/goeland/compare/v0.11.0...v0.12.0) (2022-11-13) +## [v0.12.0](https://github.com/slurdge/goeland/compare/v0.11.0...v0.12.0) (2022-11-13) ### Features @@ -218,4 +218,4 @@ v0.2.0 v0.1.4 ------ -First public version, with basic functionality and filters +First public version, with basic functionality and filters diff --git a/cmd/version.go b/cmd/version.go index 84b0fc6..4fe216f 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,8 +10,7 @@ import ( // versionCmd represents the version command var versionCmd = &cobra.Command{ Use: "version", - Short: "Print the version number of generated code example", - Long: `All software has versions. This is generated code example`, + Short: "Print the version number", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Build Date:", version.BuildDate) fmt.Println("Git Commit:", version.GitCommit)