trigger on every push for rn #1
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 and Release JAR | ||
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # Required to create releases and upload assets | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: 21 | ||
| distribution: temurin | ||
| cache: maven | ||
| - name: Build with Maven | ||
| run: mvn clean package -DskipTests | ||
| - name: Create Release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: Test Release ${{ github.ref_name }}-${{ substr(github.sha, 0, 7) }} | ||
| body: | | ||
| Automatic release for ${{ github.ref_name }} | ||
| draft: false | ||
| prerelease: true | ||
| files: target/ExtraHardMode.jar | ||