Skip to content

Commit

Permalink
chore: added "secrets.mk" to store tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanilves committed Oct 22, 2022
1 parent b5475bf commit bd7f861
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# Dependency directories
vendor/

# secret Makefile
secrets.mk

# Compiled binaries and assets
/cmd/travelgrunt/*
!/cmd/travelgrunt/*.go
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ NEXT_VERSION := v${API_VERSION}.${NEXT_PATCH}
BUILD_PATH := ./cmd/${APP_NAME}
RELEASE_PATH := ./release

-include secrets.mk

default: dep build

all: dep build install
Expand Down Expand Up @@ -74,4 +76,7 @@ github-assets:

github: github-release github-assets

full-release: clean dep release next-version-tag push-tags github
github-token:
@test -n "${GITHUB_TOKEN}" || (echo "GITHUB_TOKEN not set!" >>/dev/stderr; exit 1)

full-release: github-token clean dep release next-version-tag push-tags github
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ the shell with aliases `travelgrunt` will not work!

## How to release a new version?

:bulb: Set `GITHUB_TOKEN` environmental variable.
:bulb: Export `GITHUB_TOKEN` environmental variable.

Run `make full-release` recipe, which is equal to run following, one by one:

* `make github-token` - check if `GITHUB_TOKEN` variable is set;
* `make clean` - cleanup project tree from previously built artifacts;
* `make dep` - ensure all dependencies are installed;
* `make release` - create release artifacts;
Expand Down

0 comments on commit bd7f861

Please sign in to comment.