Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 0 additions & 78 deletions .github/workflows/release-on-tag.yml

This file was deleted.

65 changes: 60 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,72 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
- id: release
uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
manifest-file: .release-please-manifest.json
- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

# Delete old major and minor tag
git tag -d v${{ steps.release.outputs.major }} || true
Copy link

Copilot AI Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references 'steps.release.outputs.major' and 'steps.release.outputs.minor' in later steps, but these outputs are not defined in the outputs block. Define these outputs or update the references accordingly.

Copilot uses AI. Check for mistakes.
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true

# Create new major and minor tag
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
update-readme:
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
needs: [release-please]
permissions:
contents: read
id-token: write
steps:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
GITHUB_APP_ID=helper-bot:app-id
GITHUB_APP_PRIVATE_KEY=helper-bot:private-key
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ env.GITHUB_APP_ID }}
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: 'main'
token: '${{ steps.app-token.outputs.token }}'
fetch-depth: 0
- name: Update readme
if: ${{ steps.release.outputs.release_created }}
run: |
TAG_HASH="$(git rev-parse ${{ needs.release-please.outputs.tag_name }})" TAG="${{ needs.release-please.outputs.tag_name }}" envsubst < ./docs/README.tmpl > ./README.md
git add README.md
- name: Commit changes
uses: grafana/github-api-commit-action@db25908818706393572c06ecd63c378e8561314d # v0.4.0
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: 'chore(readme): update readme for ${{ needs.release-please.outputs.tag_name }} [BOT]'
42 changes: 0 additions & 42 deletions .github/workflows/update-major-release-tag.yml

This file was deleted.

6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
* **deps:** bump actions/create-github-app-token from 1 to 2 ([#79](https://github.com/grafana/github-api-commit-action/issues/79)) ([412b51b](https://github.com/grafana/github-api-commit-action/commit/412b51bdf2e89caaf37e5b53b8fbc8a4c1c1c412))
* **deps:** bump grafana/github-api-commit-action from 0.3.0 to 0.3.1 ([#65](https://github.com/grafana/github-api-commit-action/issues/65)) ([cdc46bd](https://github.com/grafana/github-api-commit-action/commit/cdc46bd6d01c95fecdf1cf2acb3106478518d17e))
* trigger tests via workflow call, dispatch or push to main ([#75](https://github.com/grafana/github-api-commit-action/issues/75)) ([f72ba3b](https://github.com/grafana/github-api-commit-action/commit/f72ba3ba7d3a7def86ad1d8b5e7706912494e4c1))
* update changelog [bot] ([#69](https://github.com/grafana/github-api-commit-action/issues/69)) ([baa0805](https://github.com/grafana/github-api-commit-action/commit/baa08050b07ba580a957460f3a47571b532104d1))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clearing out some cruft

* update changelog [bot] ([#73](https://github.com/grafana/github-api-commit-action/issues/73)) ([d2aa611](https://github.com/grafana/github-api-commit-action/commit/d2aa611fb71930eac89a03b57fb6a5925fdc9e88))
* update changelog [bot] ([#76](https://github.com/grafana/github-api-commit-action/issues/76)) ([51f759d](https://github.com/grafana/github-api-commit-action/commit/51f759dc563fe727e31d8b183a917207f3e25bad))
* update changelog [bot] ([#78](https://github.com/grafana/github-api-commit-action/issues/78)) ([96733db](https://github.com/grafana/github-api-commit-action/commit/96733dbe1bdc6d58423ecbdea0ac53a5294ceb69))
* update changelog [bot] ([#82](https://github.com/grafana/github-api-commit-action/issues/82)) ([ea14ad7](https://github.com/grafana/github-api-commit-action/commit/ea14ad7e3ff35d44fab125728092bd88e2c1a313))

## [0.3.1] - 2025-02-13

Expand All @@ -44,7 +39,6 @@

- Update commit hash in readme; add test for delete (#58)
- Add auto update and merge workflows (#60)
- Update changelog [bot] (#62)

## [0.3.0] - 2025-02-10

Expand Down
4 changes: 2 additions & 2 deletions docs/README.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ instance, if you create a branch via `git checkout -b my-test-branch` in one of

```yaml
- name: Commit changes
uses: grafana/github-api-commit-action@<tag_commit_hash> # <new_tag>
uses: grafana/github-api-commit-action@$TAG_HASH # $TAG
with:
commit-message: "<commit-message>" # Commit message defaults to "Commit performed by grafana/github-api-commit-action"
create-branch-on-remote: true | false # Whether to create the branch on the remote if it doesn't exist: Defaults to false
Expand All @@ -36,7 +36,7 @@ instance, if you create a branch via `git checkout -b my-test-branch` in one of
private_key: ${{ secrets.GITHUB_APP_PRIVATE_KEY }}

- name: Commit changes
uses: grafana/github-api-commit-action@<tag_commit_hash> # <new_tag>
uses: grafana/github-api-commit-action@$TAG_HASH # $TAG
with:
commit-message: "<commit-message>" # Commit message defaults to "Commit performed by grafana/github-api-commit-action"
create-branch-on-remote: true | false # Whether to create the branch on the remote if it doesn't exist already: Defaults to false
Expand Down
Loading