From dd30fb3d70afd0c59e2d91ad5b88fec718bf7606 Mon Sep 17 00:00:00 2001 From: Josh Shippam Date: Thu, 26 Jan 2023 02:12:06 +0000 Subject: [PATCH] Actions: Create Pre-Releases --- .github/workflows/maven.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 34b6373..c4fa77f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -4,7 +4,7 @@ # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support -# documentation. +# documentation.g name: Java CI with Maven @@ -35,9 +35,24 @@ jobs: run: | mvn -B package --file pom.xml mkdir -p ~/artifacts - mv target/Parabot-V3.0.0.jar ~/artifacts/ + cp target/Parabot-V3.0.0.jar ~/artifacts/ - name: Publish build to GH Actions uses: actions/upload-artifact@v2 with: path: ~/artifacts/* name: 2006Bot-Build + - name: Create Version + id: get_version + run: | + echo "VERSION=v$(date +%s)" >> $GITHUB_OUTPUT #&& echo "::set-output name=VERSION::${verson}" + - name: Upload Parabot Pre-Release + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.get_version.outputs.VERSION }} + name: ${{ github.sha }} + prerelease: true + files: | + target/Parabot-V3.0.0.jar