Skip to content

Merge pull request #629 from Griefed/dependabot-npm_and_yarn-serverpa… #151

Merge pull request #629 from Griefed/dependabot-npm_and_yarn-serverpa…

Merge pull request #629 from Griefed/dependabot-npm_and_yarn-serverpa… #151

Workflow file for this run

name: Continuous
on:
push:
branches:
- develop
jobs:
continuous:
name: "Continuous Pre-Release"
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper
- uses: luangong/setup-install4j@v1
with:
version: '11.0'
license: ${{ secrets.INSTALL4J_LICENSE }}
- name: Remove install4j script
run: |
rm install4j_linux-x64_*.sh
- name: Set Permissions
run: |
chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew build --info --full-stacktrace
./gradlew media --info --full-stacktrace
- name: Collect files
run: |
mkdir continuous
cp serverpackcreator-api/build/libs/*.jar continuous/
cp serverpackcreator-app/build/libs/*.jar continuous/
cp serverpackcreator-plugin-example/build/libs/*.jar continuous/
cp media/*.dmg continuous/
cp media/*.sh continuous/
cp media/*.exe continuous/
rm -f continuous/output.txt continuous/*plain.jar
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
continuous/*
- name: Collect checksum
run: |
cp checksum.txt continuous/
- name: Upload to GitHub Releases
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "continuous"
prerelease: true
title: "Development Build"
files: |
continuous/*
# - name: Delete drafts
# uses: hugo19941994/delete-draft-releases@v1.0.1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get source archives
run: |
wget -O continuous/source.zip https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.zip
wget -O continuous/source.tar.gz https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.tar.gz
- name: Cleanup continuous
id: action-ssh
uses: tiyee/action-ssh@v1.0.1
with:
host: ${{ secrets.SPCUPLOAD_HOST }}
username: ${{ secrets.SPCUPLOAD_USERNAME }}
privateKey: ${{ secrets.SPCUPLOAD_KEY }}
command: 'rm -rf ~/spc/continuous'
- name: Copy folder content recursively to remote
uses: nogsantos/scp-deploy@master
with:
src: ./continuous
host: ${{ secrets.SPCUPLOAD_HOST }}
remote: "${{ secrets.SPCUPLOAD_TARGET }}"
user: ${{ secrets.SPCUPLOAD_USERNAME }}
key: ${{ secrets.SPCUPLOAD_KEY }}