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
18 changes: 17 additions & 1 deletion .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ concurrency:

permissions:
contents: write
actions: write

jobs:
tag:
Expand All @@ -30,14 +31,29 @@ jobs:
echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT"

- name: Tag if new
id: tagstep
run: |
TAG="${{ steps.pkg.outputs.tag }}"
if git rev-parse "refs/tags/${TAG}" >/dev/null 2>&1; then
echo "::notice::Tag ${TAG} already exists; nothing to do."
echo "created=false" >> "$GITHUB_OUTPUT"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "${TAG}" -m "Release ${TAG}"
git push origin "${TAG}"
echo "::notice::Created and pushed tag ${TAG} — Release workflow will take over."
echo "created=true" >> "$GITHUB_OUTPUT"
echo "::notice::Created and pushed tag ${TAG}."

# A tag pushed with GITHUB_TOKEN does NOT fire the Release workflow's
# `on: push: tags` trigger (GitHub blocks recursive event triggering).
# Dispatch it explicitly instead — workflow_dispatch via the API is not
# subject to that restriction (needs `actions: write`).
- name: Trigger Release workflow
if: steps.tagstep.outputs.created == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run release.yml -f tag="${{ steps.pkg.outputs.tag }}"
echo "::notice::Dispatched Release workflow for ${{ steps.pkg.outputs.tag }}."
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
- name: Resolve tag
id: tag
run: |
TAG="${GITHUB_REF_NAME:-${{ github.event.inputs.tag }}}"
# On workflow_dispatch, github.ref_name is the branch (e.g. master),
# so prefer the explicit input; on a tag push, ref_name is the tag.
TAG="${{ github.event.inputs.tag || github.ref_name }}"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"

- name: Verify version matches tag
Expand Down
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
Expand Up @@ -2,7 +2,7 @@
"name": "flaunt-github",
"displayName": "Flaunt GitHub",
"description": "Passively tracks coding activity and commits a rolling journal to a private GitHub repo. Dashboard, shareable profile badge, optional AI daily summaries.",
"version": "3.0.3",
"version": "3.0.4",
"publisher": "UtkarshSingh",
"icon": "images/logo.png",
"license": "MIT",
Expand Down
Loading