Skip to content

Commit

Permalink
Prepare for v0.2.0 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane authored Jul 5, 2024
1 parent d111e0a commit 35540d2
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 29 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ ifndef VERSION_SHORT
$(error "VERSION_SHORT must be set")
endif
$(SED_I) "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $(BUF_VERSION)/g" action.yml README.md examples/*.yaml examples/*/*.yaml
$(SED_I) "s/buf-action@v[0-9]+\.[0-9]+[\.[0-9]+]?/buf-action@v$(VERSION_SHORT)/g" README.md examples/*.yaml examples/*/*.yaml
$(SED_I) "s/buf-action@v[0-9]+(\.[0-9]+)?(\.[0-9]+)?/buf-action@v$(VERSION_SHORT)/g" README.md examples/*.yaml examples/*/*.yaml
$(SED_I) "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"$(VERSION)\"/g" package.json
$(SED_I) "s/^ BUF_VERSION: \"[0-9]+\.[0-9]+\.[0-9]+\"/ BUF_VERSION: \"$(BUF_VERSION)\"/g" .github/workflows/ci.yaml
npm prune

.PHONY: generate
generate: node_modules ## Regenerate licenses
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand All @@ -57,7 +57,7 @@ To customize the behavior of the action, you can set the following parameters in
Add these parameters under the `with` section of the `uses` step in the workflow file.

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
...
```
Expand Down Expand Up @@ -101,7 +101,7 @@ To disable parts of the workflow, each step corresponds to a boolean flag in the
For example to disable formatting set the parameter `format` to `false`:

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
format: false
```
Expand All @@ -113,7 +113,7 @@ See [action.yml](action.yml) for all available parameters.
For reproducible builds, you can pin to an explicit version of `buf` by setting `version`.

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
version: 1.34.0
```
Expand All @@ -135,7 +135,7 @@ The `username` and `token` values should be
The `token` value can be [generated from the BSR UI](https://buf.build/docs/bsr/authentication#create-an-api-token).

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand All @@ -179,7 +179,7 @@ To run the action for parameters not declared at the root of the repository,
set the parameter `input` to the directory of your `buf.yaml` file.

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
input: <path/to/module>
```
Expand All @@ -188,7 +188,7 @@ Breaking change detection by default will use the `input` value as a subdirector
To customize this behavior, set the parameter `breaking_against` to the desired input.

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
input: <path/to/module>
breaking_against: ${{ github.event.repository.clone_url }}#format=git,commit=${{ github.event.pull_request.base.sha }},subdir=<path/to/module>
Expand All @@ -205,7 +205,7 @@ and then set the value of `breaking_against` to the path of the base.
with:
path: base
ref: ${{ github.event.pull_request.base.sha }}
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
input: head/<path/to/module>
breaking_against: base/<path/to/module>
Expand All @@ -220,7 +220,7 @@ This will install `buf` and optionally login to the schema registry but no addit
Subsequent steps will have `buf` available in their $PATH and can invoke `buf` directly.

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
setup_only: true
- run: buf build --error-format github-actions
Expand All @@ -234,7 +234,7 @@ To trigger steps on different events use the GitHub action context to deduce the
For example to enable formatting checks on both pull requests and push create an expression for the parameter `format`:

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
format: ${{ contains(fromJSON('["push", "pull_request"]'), github.event_name) }}
```
Expand All @@ -247,7 +247,7 @@ To conditionally run checks based on user input, use the GitHub action context t
For example to disable breaking change detection on commits, create an expression on the parameter `breaking` to check the contents of the commit message:

```yaml
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
breaking: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) &&
Expand Down
2 changes: 1 addition & 1 deletion examples/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
2 changes: 1 addition & 1 deletion examples/disable-skip/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion examples/only-checks/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
2 changes: 1 addition & 1 deletion examples/only-setup-defaults/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
setup_only: true
- env:
Expand Down
2 changes: 1 addition & 1 deletion examples/only-setup/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
# Add username or token secrets to your repository settings to
# authenticate with the Buf Schema Registry.
Expand Down
2 changes: 1 addition & 1 deletion examples/only-sync/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
2 changes: 1 addition & 1 deletion examples/push-on-changes/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
2 changes: 1 addition & 1 deletion examples/skip-on-commits/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion examples/skip-on-labels/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion examples/validate-push/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
# Username and token are required to authenticate with the Buf Schema Registry.
username: ${{ secrets.BUF_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion examples/version-env/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
setup_only: true
- run: buf version
2 changes: 1 addition & 1 deletion examples/version-input/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
setup_only: true
version: 1.34.0
Expand Down
2 changes: 1 addition & 1 deletion examples/version-latest/buf-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.1
- uses: bufbuild/buf-action@v0.2
with:
setup_only: true
- run: buf version
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buf-action",
"version": "0.1.4",
"version": "0.2.0",
"description": "GitHub Action for buf",
"main": "src/main.ts",
"scripts": {
Expand Down

0 comments on commit 35540d2

Please sign in to comment.