From 49a8de096e7e0cf65803f0b740edd7d2707bc24a Mon Sep 17 00:00:00 2001 From: adabugra <57899270+adabugra@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:51:27 +0300 Subject: [PATCH] Create maven-publish.yml --- .github/workflows/maven-publish.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..6e1222c --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,36 @@ +name: Build and upload jar + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Java 17 + uses: actions/setup-java@v2 + with: + distribution: 'corretto' + java-package: jdk + java-version: '17' + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + run: mvn verify -B --file pom.xml + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + # Artifact name + name: TownyBlockBugFix + # A file, directory or wildcard pattern that describes what to upload + path: target/*