fix: age-aware staleness check for /roadmap (v0.8.11) (#35) #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto-tag on VERSION change | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [VERSION] | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read version and create tag | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '[:space:]') | |
| if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$'; then | |
| echo "Invalid VERSION format: '$VERSION'" | |
| exit 1 | |
| fi | |
| TAG="v${VERSION}" | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists — skipping." | |
| exit 0 | |
| fi | |
| echo "Creating tag $TAG" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "$TAG" -m "Release ${VERSION}" | |
| git push origin "$TAG" | |
| echo "Tagged $TAG successfully." |