Auto tagging obsidian notes w/ AI
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add auto-tagging workflow for version bumps

+53
+53
.github/workflows/auto-tag.yml
··· 1 + name: Auto Tag on Version Bump 2 + 3 + on: 4 + push: 5 + branches: 6 + - main 7 + paths: 8 + - 'manifest.json' 9 + 10 + jobs: 11 + tag: 12 + runs-on: ubuntu-latest 13 + permissions: 14 + contents: write 15 + steps: 16 + - name: Checkout code 17 + uses: actions/checkout@v4 18 + with: 19 + fetch-depth: 0 # Fetch all history and tags 20 + 21 + - name: Get version from manifest 22 + id: get_version 23 + run: | 24 + VERSION=$(jq -r '.version' manifest.json) 25 + echo "version=$VERSION" >> $GITHUB_OUTPUT 26 + echo "Version from manifest: $VERSION" 27 + 28 + - name: Check if tag exists 29 + id: check_tag 30 + run: | 31 + VERSION="${{ steps.get_version.outputs.version }}" 32 + if git rev-parse "refs/tags/$VERSION" >/dev/null 2>&1; then 33 + echo "exists=true" >> $GITHUB_OUTPUT 34 + echo "Tag $VERSION already exists" 35 + else 36 + echo "exists=false" >> $GITHUB_OUTPUT 37 + echo "Tag $VERSION does not exist" 38 + fi 39 + 40 + - name: Create and push tag 41 + if: steps.check_tag.outputs.exists == 'false' 42 + run: | 43 + VERSION="${{ steps.get_version.outputs.version }}" 44 + git config user.name "github-actions[bot]" 45 + git config user.email "github-actions[bot]@users.noreply.github.com" 46 + git tag -a "$VERSION" -m "Release version $VERSION" 47 + git push origin "$VERSION" 48 + echo "Created and pushed tag: $VERSION" 49 + 50 + - name: Tag already exists 51 + if: steps.check_tag.outputs.exists == 'true' 52 + run: | 53 + echo "Tag ${{ steps.get_version.outputs.version }} already exists, skipping tag creation"