chore: YourKit logo. #228
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: Publishing | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| packages: write | |
| actions: read | |
| jobs: | |
| Publish: | |
| name: Publish | |
| runs-on: ubuntu-24.04 | |
| if: contains(github.event.head_commit.message, 'published') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Java JDK | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew allJar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_USERNAME: ${{ github.actor }} | |
| isGitHubActions: "true" | |
| - name: Set outputs | |
| id: short_sha | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Get Repository Name | |
| uses: MariachiBear/get-repo-name-action@v1.1.0 | |
| - name: Publish to GitHub Packages | |
| run: ./gradlew publish -PisGitHubActions=true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_USERNAME: ${{ github.actor }} |