Skip to content

Commit

Permalink
Merge pull request #519 from DefangLabs/lio-make-release
Browse files Browse the repository at this point in the history
Release target in Makefile
  • Loading branch information
lionello authored Jul 2, 2024
2 parents d369127 + 12d6f76 commit 705f9b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ jobs:

build-and-sign:
name: Build app and sign files with Trusted Signing
environment: release
needs: go-test
runs-on: windows-latest # for signtool
env: # from https://github.com/spiffe/spire/pull/5158
Expand Down Expand Up @@ -223,8 +222,8 @@ jobs:
if-no-files-found: error

go-release:
# environment: release
if: startsWith(github.ref, 'refs/tags/v') # only run this step on tagged commits
environment: release
needs:
- build-and-sign-mac
- build-and-sign
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ no-diff:
pull:
git pull

.PHONY: version
version: no-diff pull test
.PHONY: release
release: pull test no-diff
git tag $$(git tag -l 'v*' --sort=-v:refname | head -n1 | awk -F. '{$$NF = $$NF + 1;} 1' OFS=.)
git push --follow-tags
git push --follow-tags --tags
8 changes: 8 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ To regenerate the `go.mod` file:
```
go mod tidy
```

## Release
To release a new version, run:
```
make release
```
This will create a new tag (incrementing the patch number) and push it to the
repository, triggering a new build on the CI/CD pipeline.

0 comments on commit 705f9b2

Please sign in to comment.