Remove temp leiningen testing workflow #3
Workflow file for this run
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: Update Major Version Tag | |
| on: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'The full version tag to process (e.g., 13.1.0)' | |
| required: true | |
| type: string | |
| jobs: | |
| update-major-tag: | |
| name: Update Major Version Tag | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get tag name | |
| id: get-tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| TAG="${{ inputs.tag }}" | |
| else | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| # Extract major version (e.g., 13 from 13.1.0) | |
| MAJOR_TAG=$(echo "$TAG" | sed -E 's/^([0-9]+)\..*/\1/') | |
| echo "major_tag=$MAJOR_TAG" >> $GITHUB_OUTPUT | |
| - name: Update major version tag | |
| run: | | |
| TAG="${{ steps.get-tag.outputs.tag }}" | |
| MAJOR_TAG="${{ steps.get-tag.outputs.major_tag }}" | |
| echo "Processing tag: $TAG" | |
| echo "Major version tag: $MAJOR_TAG" | |
| # Configure git | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Get the commit SHA for the pushed tag | |
| COMMIT_SHA=$(git rev-list -n 1 "$TAG") | |
| echo "Commit SHA: $COMMIT_SHA" | |
| # Delete the major tag locally if it exists | |
| git tag -d "$MAJOR_TAG" 2>/dev/null || true | |
| # Create/update the major version tag pointing to the same commit | |
| git tag "$MAJOR_TAG" "$COMMIT_SHA" | |
| # Force push the major version tag to origin | |
| git push origin "$MAJOR_TAG" --force | |
| echo "Successfully updated $MAJOR_TAG to point to $TAG ($COMMIT_SHA)" |