Skip to content

chore: attachment margin (#64) #80

chore: attachment margin (#64)

chore: attachment margin (#64) #80

Workflow file for this run

name: Bump Version
on:
push:
branches:
- main
jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取完整历史
- name: Find nearest version tag
id: get_tag
run: |
tag=$(git describe --tags --match "v*" --abbrev=0)
echo "Found tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Bump patch version
id: bump
run: |
tag="${{ steps.get_tag.outputs.tag }}"
# Remove v prefix
version="${tag#v}"
# Use awk or bash logic to increment the last digit
IFS='.' read -r -a parts <<< "$version"
last_index=$((${#parts[@]} - 1))
parts[$last_index]=$((parts[$last_index] + 1))
# Reassemble
new_version="${parts[0]}"
for i in $(seq 1 $last_index); do
new_version="${new_version}.${parts[$i]}"
done
new_tag="v${new_version}"
echo "Bumped tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_OUTPUT
- name: Create and push new tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "${{ steps.bump.outputs.new_tag }}"
git push origin "${{ steps.bump.outputs.new_tag }}"
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.GH_PAT }}
repository: PaperDebugger/paperdebugger
event-type: release
client-payload: '{"tag": "${{ steps.bump.outputs.new_tag }}"}'