-
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.
- Loading branch information
1 parent
0b932ed
commit 7bcac53
Showing
5 changed files
with
89 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: ["v*"] | ||
paths-ignore: ['**.md'] | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths-ignore: ['**.md'] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "~1.13.10" | ||
- name: Ensure go.mod is already tidied | ||
run: go mod tidy && git diff -s --exit-code go.sum | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: go get github.com/mitchellh/gox | ||
- run: make test archives test-archive | ||
- name: Create a new release | ||
if: contains(github.ref, 'tags') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload binaries to the new release | ||
if: contains(github.ref, 'tags') | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: out/* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
create-pr: | ||
needs: [run] | ||
if: contains(github.ref, 'tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: kubernetes-sigs/krew-index | ||
- run: | | ||
git fetch --unshallow | ||
git remote set-url origin https://${{ secrets.GH_PAT }}:[email protected]/superbrothers/krew-index.git | ||
- run: echo ::set-env name=GIT_TAG::${GITHUB_REF##*/} | ||
- name: Download the released krew plugin manifest file | ||
run: | | ||
curl -sLo plugins/sort-manifests.yaml https://github.com/superbrothers/kubectl-sort-manifests-plugin/releases/download/${{ env.GIT_TAG }}/sort-manifests.yaml | ||
git --no-pager diff | ||
- uses: peter-evans/create-pull-request@v2 | ||
with: | ||
token: ${{ secrets.GH_PAT }} | ||
committer: Kazuki Suda <[email protected]> | ||
author: Kazuki Suda <[email protected]> | ||
commit-message: Bump the version of sort-manifests to ${{ env.GIT_TAG }} | ||
title: Bump the version of sort-manifests to ${{ env.GIT_TAG }} | ||
body: This PR bumps up the version of sort-manifests to ${{ env.GIT_TAG }}. | ||
branch: sort-manifests-${{ env.GIT_TAG }} | ||
equest-to-parent: true |
This file was deleted.
Oops, something went wrong.
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
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