diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 616f227..7f660a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: id: changelog uses: TriPSs/conventional-changelog-action@v3 with: - # github-token: ${{ secrets.github_token }} + github-token: ${{ secrets.github_token }} # output-file: "false" skip-commit: "true" skip-tag: "true" diff --git a/Makefile b/Makefile index 79474b9..60729ff 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ build-release: github-release: bin/release +github-rerelease: + bin/rerelease + local-release: build-release bin/local-release diff --git a/README.md b/README.md index 620f7e7..841dcb6 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,6 @@ You can hit the API locally for testing using: `http localhost:9029/status` - Run the binary manually `swift run` - Copy local config `cp ./config.json ~/.config/focus/config.json` - Generate a new release `git tag v0.1.3 && git push --tags origin HEAD` -- Delete last tag remotely and locally `TAG=$(git describe --tags --abbrev=0); git tag -d $TAG; git push --delete origin $TAG` ## Tests diff --git a/bin/release b/bin/release index 5859357..5f20259 100755 --- a/bin/release +++ b/bin/release @@ -1,5 +1,7 @@ #!/bin/bash -cd "${0%/*}/.." || exit +set -e + +cd "${0%/*}/.." # trunk-ignore(shellcheck/SC2312) version=$(git tag --list | tail -n 1) diff --git a/bin/rerelease b/bin/rerelease new file mode 100755 index 0000000..caf08c8 --- /dev/null +++ b/bin/rerelease @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +cd "${0%/*}/.." + +# delete last tag remotely and locally +# useful when trying to get gh action releases to work +TAG=$(git describe --tags --abbrev=0) +git tag -d "${TAG}" +git push --delete origin "${TAG}" + +bin/release