diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f5b4631e7..4825c5af3 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -9,14 +9,19 @@ on: jobs: build: + name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + + - name: Checkout + uses: actions/checkout@v4 + - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: maven + - name: Build and Test with Maven run: mvn --batch-mode --update-snapshots verify diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index ce1f58be9..6226afac3 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -16,41 +16,51 @@ jobs: name: Build Jar runs-on: ubuntu-latest steps: + - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: maven + - name: Set Version uses: datamonsters/replace-action@v2 with: files: 'pom.xml' replacements: 'Snapshot=${{ github.event.inputs.version_number }}' + - name: Build with Maven run: mvn --batch-mode --update-snapshots verify + - name: Rename jar run: mv target/*-All.jar JMusicBot-${{ github.event.inputs.version_number }}.jar + - name: Upload jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: jar + name: JMusicBot-${{ github.event.inputs.version_number }} path: JMusicBot-${{ github.event.inputs.version_number }}.jar if-no-files-found: error + create_release: name: Create Release runs-on: ubuntu-latest needs: build_jar steps: + - name: Download a Build Artifact - uses: actions/download-artifact@v3.0.0 + uses: actions/download-artifact@v4 with: name: jar path: . + - name: Show Artifacts run: ls -R + - name: Create Release uses: ncipollo/release-action@v1 with: