none was not in roles definition and thus was unassignable #628
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: Build, Test And Upgrade SNAPSHOT if needed | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [ main ] | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build with Gradle | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| uses: gradle/gradle-build-action@v3 | |
| with: | |
| cache-disabled: false | |
| # Cache storage space is limited for GitHub actions | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| arguments: | | |
| build | |
| -x test | |
| -x spotlessCheck | |
| -x detekt | |
| - name: Run unit tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| uses: gradle/gradle-build-action@v3 | |
| with: | |
| cache-disabled: false | |
| # Cache storage space is limited for GitHub actions | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| arguments: test -x spotlessCheck | |
| update_snapshot_and_package: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| needs: | |
| - build_and_test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get previous tag | |
| id: previoustag | |
| run: | | |
| previousTag=$(git describe --tags --abbrev=0) | |
| echo "tag=${previousTag}" >> "$GITHUB_OUTPUT" | |
| - name: Clean Snapshot | |
| uses: dev-drprasad/[email protected] | |
| if: ${{ endsWith(steps.previoustag.outputs.tag, '-SNAPSHOT') }} | |
| with: | |
| tag_name: ${{ steps.previoustag.outputs.tag }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create tag | |
| if: ${{ endsWith(steps.previoustag.outputs.tag, '-SNAPSHOT') }} | |
| uses: EndBug/latest-tag@latest | |
| with: | |
| ref: ${{ steps.previoustag.outputs.tag }} | |
| description: ${{ steps.previoustag.outputs.tag }} | |
| - name: Create Release | |
| if: ${{ endsWith(steps.previoustag.outputs.tag, '-SNAPSHOT') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ steps.previoustag.outputs.tag }} | |
| run: | | |
| gh release create "$TAG" \ | |
| --title="$TAG" \ | |
| --generate-notes | |
| - name: Set up JDK | |
| if: ${{ endsWith(steps.previoustag.outputs.tag, '-SNAPSHOT') }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Publish with Gradle | |
| if: ${{ endsWith(steps.previoustag.outputs.tag, '-SNAPSHOT') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VERSION: ${{ steps.previoustag.outputs.tag }} | |
| uses: gradle/gradle-build-action@v3 | |
| with: | |
| cache-disabled: true | |
| arguments: | | |
| publish |