fix smol typo #142
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
| # This workflow will build a Java project with Gradle | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: Generate release and publish jar | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Get version from gradle.build | |
| run: echo VERSION=$(grep -Po '(?<=^version=).*$' gradle.properties) >> $GITHUB_ENV | |
| - name: Check if tag for version already exists | |
| uses: mukunku/tag-exists-action@v1.0.0 | |
| id: checkTag | |
| with: | |
| tag: ${{ env.VERSION }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Output and stop if it does | |
| if: steps.checkTag.outputs.exists == 'true' | |
| run: echo Release for this version already exists, skipping build process! | |
| - name: Set up JDK 8 | |
| if: steps.checkTag.outputs.exists == 'false' | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '8' | |
| distribution: 'adopt' | |
| - name: Grant execute permission for gradlew | |
| if: steps.checkTag.outputs.exists == 'false' | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| if: steps.checkTag.outputs.exists == 'false' | |
| run: ./gradlew build | |
| - name: Create tag for current version | |
| if: steps.checkTag.outputs.exists == 'false' | |
| uses: laputansoft/github-tag-action@v4.6 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ env.VERSION }} | |
| - name: Upload jar as artifact | |
| if: steps.checkTag.outputs.exists == 'false' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Jar file | |
| path: build/libs/*.jar | |
| - name: Create release from new jar | |
| if: steps.checkTag.outputs.exists == 'false' | |
| uses: softprops/action-gh-release@v0.1.7 | |
| with: | |
| tag_name: ${{ env.VERSION }} | |
| files: build/libs/*.jar |