--- name: Version Maintenance on: schedule: # Run weekly on Monday at 9 AM UTC - cron: '0 9 * * 1' workflow_dispatch: inputs: major-version: description: 'Major version to check (e.g., v2025)' required: false type: string permissions: contents: write pull-requests: write issues: write jobs: check-and-update: name: Check Version References runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e # v6-beta with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - name: Determine Major Version id: version shell: sh run: | if [ -n "${{ inputs.major-version }}" ]; then printf '%s\n' "major=${{ inputs.major-version }}" >> "$GITHUB_OUTPUT" else current_year=$(date +%Y) printf '%s\n' "major=v$current_year" >> "$GITHUB_OUTPUT" fi - name: Run Action Versioning id: action-versioning uses: ./action-versioning with: major-version: ${{ steps.version.outputs.major }} token: ${{ secrets.GITHUB_TOKEN }} - name: Create Pull Request if: steps.action-versioning.outputs.updated == 'true' uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'chore: update action references to ${{ steps.version.outputs.major }}' title: 'chore: Update action references to ${{ steps.version.outputs.major }}' body: | ## Version Maintenance This PR updates all internal action references to match the latest ${{ steps.version.outputs.major }} tag. **Updated SHA**: `${{ steps.action-versioning.outputs.commit-sha }}` ### Changes - Updated all `*/action.yml` files to reference the current ${{ steps.version.outputs.major }} SHA ### Verification ```bash make check-version-refs ``` 🤖 Auto-generated by version-maintenance workflow branch: automated/version-update-${{ steps.version.outputs.major }} delete-branch: true labels: | automated dependencies - name: Check for Annual Bump if: steps.action-versioning.outputs.needs-annual-bump == 'true' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: | const currentYear = new Date().getFullYear(); const majorVersion = '${{ steps.version.outputs.major }}'; await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: `🔄 Annual Version Bump Needed: ${majorVersion} → v${currentYear}`, body: `## Annual Version Bump Required It's time to bump the major version from ${majorVersion} to v${currentYear}. ### Steps 1. **Create the new major version tag:** \`\`\`bash git tag -a v${currentYear} -m "Major version v${currentYear}" git push origin v${currentYear} \`\`\` 2. **Bump all action references:** \`\`\`bash make bump-major-version OLD=${majorVersion} NEW=v${currentYear} \`\`\` 3. **Update documentation:** \`\`\`bash make docs \`\`\` 4. **Commit and push:** \`\`\`bash git push origin main \`\`\` ### Verification \`\`\`bash make check-version-refs \`\`\` 🤖 Auto-generated by version-maintenance workflow `, labels: ['maintenance', 'high-priority'] });