This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from TurnipTales/develop
develop
- Loading branch information
Showing
42 changed files
with
1,867 additions
and
1,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "develop", "hotfix/**" ] | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
branches: [ "develop", "hotfix/**" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
name: 🏗️ Build TurnipTales Discord Bot | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
distribution: 'corretto' | ||
java-version: '17' | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set application properties | ||
env: | ||
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }} | ||
run: | | ||
echo "discord.bot.token=$DISCORD_BOT_TOKEN" >> src/main/resources/application.properties | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
run: mvn -B test package --file pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,57 @@ name: Release | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
release: | ||
|
||
name: 🎉 Release TurnipTales Discord Bot | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
distribution: 'corretto' | ||
java-version: '17' | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set application properties | ||
env: | ||
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }} | ||
run: | | ||
echo "discord.bot.token=$DISCORD_BOT_TOKEN" >> src/main/resources/application.properties | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
run: mvn -B test package --file pom.xml | ||
|
||
- if: github.event_name == 'push' | ||
name: Upload via SCP | ||
uses: appleboy/[email protected] | ||
with: | ||
host: turniptales.net | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.KEY }} | ||
port: 22 | ||
source: "target/turniptales-discord.jar" | ||
target: "/home/discord" | ||
timeout: 120s | ||
strip_components: 1 | ||
|
||
- if: github.event_name == 'push' | ||
name: Restart TurnipTales API | ||
uses: appleboy/[email protected] | ||
with: | ||
name: Artifacts | ||
path: target/discord-1.0.0.jar | ||
host: turniptales.net | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.KEY }} | ||
port: 22 | ||
script: | | ||
cd /home/discord | ||
chown -R root:root turniptales-discord.jar | ||
./run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
wrapperVersion=3.3.2 | ||
distributionType=only-script | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.