Skip to content

Commit

Permalink
update all references to v0.0.40
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatjindal committed Jun 25, 2021
1 parent b317db2 commit 56925b6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 40 deletions.
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To trigger `krew-release-bot` you can use a `github-action` which sends the even
- To setup the action, add the following snippet after the step that publishes the new release and assets:
```yaml
- name: Update new version in krew-index
uses: rajatjindal/[email protected].38
uses: rajatjindal/[email protected].40
```
Check out the `goreleaser` example below for details.

Expand All @@ -28,29 +28,29 @@ name: release
on:
push:
tags:
- 'v*.*.*'
- "v*.*.*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version in krew-index
uses: rajatjindal/[email protected].38
- name: Checkout
uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version in krew-index
uses: rajatjindal/[email protected].40
```

** You can also customize the release assets names, platforms for which build is done using .goreleaser.yml file in root of your git repo.
\*\* You can also customize the release assets names, platforms for which build is done using .goreleaser.yml file in root of your git repo.

# Examples using krew-release-bot in different ways

Expand All @@ -62,24 +62,24 @@ jobs:
# Testing the template file

You can test the template file rendering before check-in to the repo by running following command

```bash
$ docker run -v /path/to/your/template-file.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.38 \
$ docker run -v /path/to/your/template-file.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.40 \
krew-release-bot template --tag <tag-name> --template-file /tmp/template-file.yaml
```

# Inputs for the action

| Key | Default Value | Description |
| ------------- | ------------- | ----------- |
| workdir | `env.GITHUB_WORKSPACE` | Overrides the GitHub workspace directory path |
| krew_template_file | `.krew.yaml` | The path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml |

| Key | Default Value | Description |
| ------------------ | ---------------------- | ------------------------------------------------------------------------------------ |
| workdir | `env.GITHUB_WORKSPACE` | Overrides the GitHub workspace directory path |
| krew_template_file | `.krew.yaml` | The path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml |

# Limitations of krew-release-bot

- only works for repos hosted on github right now
- The first version of plugin has to be submitted manually, by plugin author, to the krew-index repo


# Kubernetes CLA

krew-release-bot is just a service to open PR on your behalf to release a new version of the krew-plugin. Your CLA agreement (that you did when submitting the new plugin to krew-index) is still applicable on these PR's.
krew-release-bot is just a service to open PR on your behalf to release a new version of the krew-plugin. Your CLA agreement (that you did when submitting the new plugin to krew-index) is still applicable on these PR's.
12 changes: 6 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# action.yml
name: 'krew-release-bot'
description: 'automatically opens PR for upstream krew-index repo when you publish new release of your awesome plugin'
name: "krew-release-bot"
description: "automatically opens PR for upstream krew-index repo when you publish new release of your awesome plugin"
runs:
using: 'docker'
image: 'docker://rajatjindal/krew-release-bot:v0.0.39'
using: "docker"
image: "docker://rajatjindal/krew-release-bot:v0.0.40"
inputs:
workdir:
description: 'Working directory, defaults to env.GITHUB_WORKSPACE'
description: "Working directory, defaults to env.GITHUB_WORKSPACE"
krew_template_file:
description: 'the path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml. defaults to .krew.yaml'
description: "the path to template file relative to $workdir. e.g. templates/misc/plugin-name.yaml. defaults to .krew.yaml"
4 changes: 1 addition & 3 deletions examples/circleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ jobs:
docker:
- image: circleci/golang:1.16
environment:

## KREW_RELEASE_BOT_WEBHOOK_URL env helps you test your setup without actually publishing to kubernetes-sigs/krew-index
## remove this env when you are ready for real release

KREW_RELEASE_BOT_WEBHOOK_URL: https://krew-release-bot-dryrun.rajatjindal.com/github-action-webhook
KREW_RELEASE_BOT_VERSION: v0.0.39
KREW_RELEASE_BOT_VERSION: v0.0.40
steps:
- checkout
- run: |
Expand All @@ -19,7 +18,6 @@ jobs:
tar -xvf krew-release-bot_${KREW_RELEASE_BOT_VERSION}_linux_amd64.tar.gz
- run: ./krew-release-bot action


workflows:
version: 2
main:
Expand Down
6 changes: 3 additions & 3 deletions examples/travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ if: tag IS present
## remove this env when you are ready for real release
env:
- KREW_RELEASE_BOT_WEBHOOK_URL=https://krew-release-bot-dryrun.rajatjindal.com/github-action-webhook

sudo: false

script:
- curl -LO https://github.com/rajatjindal/krew-release-bot/releases/download/v0.0.39/krew-release-bot_v0.0.38_linux_amd64.tar.gz
- tar -xvf krew-release-bot_v0.0.39_linux_amd64.tar.gz
- curl -LO https://github.com/rajatjindal/krew-release-bot/releases/download/v0.0.40/krew-release-bot_v0.0.40_linux_amd64.tar.gz
- tar -xvf krew-release-bot_v0.0.40_linux_amd64.tar.gz
- printenv && pwd && ls -ltr
- ./krew-release-bot action
2 changes: 1 addition & 1 deletion template.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

VERSION=v0.0.39
VERSION=v0.0.40
docker run --rm -v `pwd`:/home/app rajatjindal/krew-release-bot:$VERSION krew-release-bot template
2 changes: 1 addition & 1 deletion update-krew-index.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export KREW_RELEASE_BOT_VERSION=v0.0.39
export KREW_RELEASE_BOT_VERSION=v0.0.40

curl -LO https://github.com/rajatjindal/krew-release-bot/releases/download/${KREW_RELEASE_BOT_VERSION}/krew-release-bot_${KREW_RELEASE_BOT_VERSION}_linux_amd64.tar.gz
tar -xvf krew-release-bot_${KREW_RELEASE_BOT_VERSION}_linux_amd64.tar.gz
Expand Down

0 comments on commit 56925b6

Please sign in to comment.