chore: move update-version to ci
Eliminate the GitHub workflow for automatic README updates and adjust the README files to reflect the new version tag. This change streamlines the process by removing redundant steps and ensures explicit control over version increments. chore: add dependabot.yml (#302) chore(deps): bump oven-sh/setup-bun from 1 to 2 (#305) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Update checkout action to fetch all tags Improve version update script to handle errors - Change version increment logic to handle missing tags. - Add error handling for version mismatches in README.md files. - Display directories with changed files for better visibility. Improve version bumping process in update script By checking for diffs after processing each README.md, we can ensure that only modified files trigger version bump messages. This change also refines the status check to target README.md files specifically, aiding in precise error handling. Clarify update script comment for version bumping Improve version check and output in scripts - Enhance visibility of version mismatches by focusing git diff on README.md files. - Use command substitution to improve clarity in conditional checks. Apply suggestions from code review Co-authored-by: Mathias Fredriksson <mafredri@gmail.com> simplify specify shell Update ci.yaml Update ci.yaml Update update-version.sh Update ci.yaml Enhance version bump logic output in script - Improve the clarity of version bump output by specifying current and incremented versions. - Add additional message for unchanged README.md files.pull/301/head
parent
c2ec4cbfc6
commit
70e6092360
@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
@ -1,42 +0,0 @@
|
|||||||
name: Update README on Tag
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-readme:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Get the latest tag
|
|
||||||
id: get-latest-tag
|
|
||||||
run: echo "TAG=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Run update script
|
|
||||||
run: ./update-version.sh
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
id: create-pr
|
|
||||||
uses: peter-evans/create-pull-request@v5
|
|
||||||
with:
|
|
||||||
commit-message: 'chore: bump version to ${{ env.TAG }} in README.md files'
|
|
||||||
title: 'chore: bump version to ${{ env.TAG }} in README.md files'
|
|
||||||
body: 'This is an auto-generated PR to update README.md files of all modules with the new tag ${{ env.TAG }}'
|
|
||||||
branch: 'update-readme-branch'
|
|
||||||
base: 'main'
|
|
||||||
env:
|
|
||||||
TAG: ${{ steps.get-latest-tag.outputs.TAG }}
|
|
||||||
|
|
||||||
- name: Auto-approve
|
|
||||||
uses: hmarr/auto-approve-action@v4
|
|
||||||
if: github.ref == 'refs/heads/update-readme-branch'
|
|
Loading…
Reference in New Issue