-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use krew-plugin-release instead of krew-release-bot (#48)
- Loading branch information
1 parent
9e1a6b4
commit 03533de
Showing
8 changed files
with
579 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,20 @@ jobs: | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Release | ||
run: make release | ||
- run: make dist | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/!(config.yaml) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update new version in krew-index | ||
uses: rajatjindal/[email protected] | ||
- uses: superbrothers/actions/krew-plugin-test@master | ||
with: | ||
manifest: ./dist/sort-manifests.yaml | ||
command: kubectl sort-manifests --help | ||
- uses: superbrothers/actions/krew-plugin-release@master | ||
with: | ||
token: ${{ secrets.PAT }} | ||
plugin_name: sort-manifests | ||
manifest_path: dist/sort-manifests.yaml | ||
git_author_name: Kazuki Suda | ||
git_author_email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e -o pipefail; [[ -n "$DEBUG" ]] && set -x | ||
|
||
# parse the current git commit hash | ||
commit="$(git rev-parse HEAD)" | ||
|
||
# check if the current commit has a matching tag | ||
tag="$(git describe --exact-match --abbrev=0 --tags "${commit}" 2> /dev/null ||:)" | ||
|
||
# use the matching tag as the version, if available | ||
if [[ -z "$tag" ]]; then | ||
version="v0.0.0-${commit}" | ||
else | ||
version="$tag" | ||
fi | ||
|
||
# check for changed files | ||
if [[ -n "$(git diff --shortstat 2> /dev/null | tail -n1)" ]]; then | ||
version="${version}-dirty" | ||
fi | ||
|
||
echo "$version" | ||
# vim: ai ts=2 sw=2 et sts=2 ft=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
module github.com/superbrothers/kubectl-open-svc-plugin/hack/tools | ||
|
||
go 1.15 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/goreleaser/goreleaser v0.145.0 | ||
github.com/golangci/golangci-lint v1.32.0 | ||
github.com/golangci/golangci-lint v1.36.0 | ||
github.com/goreleaser/goreleaser v0.157.0 | ||
github.com/hairyhenderson/gomplate/v3 v3.9.0 | ||
) |
Oops, something went wrong.