From 6b50a3c74d03fed2313a3a357971bb67de8bf88a Mon Sep 17 00:00:00 2001 From: Waterdev <30842467+UnrealValentin@users.noreply.github.com> Date: Tue, 4 May 2021 10:27:27 +0200 Subject: [PATCH 1/2] Create nightly.yml --- .github/workflows/nightly.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..445aea0 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,32 @@ +# This workflow will run a nightly build and push it to the github releases section +name: Deploy Nightly +on: + schedule: + - cron: '0 2 * * *' # run at 2 AM UTC + +jobs: + nightly: + name: Build and deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Deploy release + uses: WebFreak001/deploy-nightly@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions + with: + upload_url: https://uploads.github.com/repos/HMCore/Core/releases/42400467/assets{?name,label} # find out this value by opening https://api.github.com/repos///releases in your browser and copy the full "upload_url" value including the {?name,label} part + release_id: 42400467 # same as above (id can just be taken out the upload_url, it's used to find old releases) + asset_path: ./build/libs/HMCore-1.0-SNAPSHOT.jar # path to archive to upload + asset_name: HMCore_SNAPSHOT-nightly-$$.jar # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash + asset_content_type: application/java-archive # required by GitHub API + max_releases: 3 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted From 1f66d85f75d69fac1f7d9027f391ff7d7e5677fd Mon Sep 17 00:00:00 2001 From: Waterdev <30842467+UnrealValentin@users.noreply.github.com> Date: Tue, 4 May 2021 10:31:03 +0200 Subject: [PATCH 2/2] added ability ro manually run nightly workflow --- .github/workflows/nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 445aea0..22d416b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -3,6 +3,7 @@ name: Deploy Nightly on: schedule: - cron: '0 2 * * *' # run at 2 AM UTC + workflow_dispatch: jobs: nightly: