Skip to content

Merge pull request #2 from yadobler/branch-A-Assertions #4

Merge pull request #2 from yadobler/branch-A-Assertions

Merge pull request #2 from yadobler/branch-A-Assertions #4

Workflow file for this run

name: Test and Generate jar file when tag pushed
on:
push:
tags:
- "*"
jobs:
# This tests if the build, checkstyle and jUnit tests pass, then
testAndGenerateReleaseFile:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: run checkstyle
run: ./gradlew checkstyleTest checkstyleMain
- name: run gradle test
run: ./gradlew test
- name: build Jar file
run: ./gradlew shadowJar
- name: Release Jar file
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/libs/yappingbot.jar
name: (${{github.ref_name}}) New Jar File Release!
generate_release_notes: true
token: ${{ secrets.IP_RELEASE_TOKEN }}