Junit tests for file icon registration #10
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: Release and Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Triggers when receiving a tag push such v1.0.1 | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Make Gradle wrapper executable | |
| run: chmod +x gradlew | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| server-id: github # Maven authentification | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Run Tests (JUnit) | |
| run: ./gradlew test | |
| - name: Build JAR | |
| run: ./gradlew assemble | |
| - name: Prepare Fixed Name JAR | |
| run: cp build/libs/nebulae-*.jar build/libs/nebulae.jar | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/libs/nebulae.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to GitHub Packages | |
| run: ./gradlew publish -PreleaseVersion=${GITHUB_REF_NAME#v} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |