fix(providers): treat email, profile, groups, offline_access as mandatory scopes #149
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
| --- | |
| # yamllint disable rule:truthy | |
| name: Auto Release | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| permissions: | |
| contents: write # Needed to create releases and tags | |
| pull-requests: read # Needed to read PR information | |
| jobs: | |
| auto_release: | |
| name: Auto Release | |
| if: >- | |
| github.event.pull_request.merged && | |
| !startsWith(github.event.pull_request.title, 'Release v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| # Fetch all history and tags for version calculation | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| - name: Determine Next Version | |
| id: version | |
| run: | | |
| set -e | |
| # Use version-aware sorting to find the semantically highest tag, | |
| # not just the nearest reachable one. git describe can pick the | |
| # wrong tag when multiple tags point to the same commit. | |
| LATEST_TAG=$(git tag --sort=-version:refname | head -1) | |
| if [ -z "$LATEST_TAG" ]; then | |
| LATEST_TAG="v0.0.0" | |
| fi | |
| # Remove 'v' prefix | |
| LATEST_VERSION=${LATEST_TAG#v} | |
| # Split into major, minor, patch | |
| IFS='.' read -r -a VERSION_PARTS <<< "$LATEST_VERSION" | |
| # Increment patch version | |
| NEXT_PATCH=$((VERSION_PARTS[2] + 1)) | |
| # Construct next version string | |
| NEXT_VERSION="v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.$NEXT_PATCH" | |
| echo "Latest tag: $LATEST_TAG" | |
| echo "Next version: $NEXT_VERSION" | |
| # Set output for subsequent steps | |
| echo "next_version=$NEXT_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Create Tag | |
| run: | | |
| NEXT_VERSION="${{ steps.version.outputs.next_version }}" | |
| git tag "$NEXT_VERSION" | |
| git push origin "$NEXT_VERSION" | |
| echo "Created and pushed tag $NEXT_VERSION" | |
| - name: Create GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ steps.version.outputs.next_version }} | |
| run: | | |
| gh release create "$TAG" \ | |
| --title "Release $TAG" \ | |
| --generate-notes \ | |
| --verify-tag |