Skip to content

Commit 70d6138

Browse files
authored
Workflow test (#21)
* update readme * Update workflow * Update urls * Update deploy script * update iridiumcolorapi version * Update workflow * Update readme info
1 parent 4b4468a commit 70d6138

File tree

8 files changed

+89
-156
lines changed

8 files changed

+89
-156
lines changed

.github/workflows/compile.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44
push:
55
branches-ignore:
66
- production
7+
- development
78
pull_request:
9+
types:
10+
- opened
11+
- edited
812
branches-ignore:
913
- production
1014

@@ -13,24 +17,13 @@ jobs:
1317
runs-on: ubuntu-latest
1418
environment:
1519
name: development
16-
url: https://repo.andrei1058.dev
1720
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up JDK 17.0.2
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
- name: Set up JDK 17.0.7
2024
uses: actions/setup-java@v2
2125
with:
22-
java-version: '17.0.2'
23-
distribution: 'adopt'
24-
- name: Deploy snapshot with Maven
25-
env:
26-
MVN_REPO_USER: ${{ secrets.MVN_REPO_USER }}
27-
MVN_REPO_PASS: ${{ secrets.MVN_REPO_PASS }}
28-
ANDEV_RES_ID: 2
29-
run: |
30-
sudo apt install jq -y
31-
curl -X GET https://api.andrei1058.dev/v1/resources/$ANDEV_RES_ID/versioning/current -H "Accept: application/json" >> version.json
32-
export UPDATE_VERSION=`jq '.version' version.json | tr -d '"'`
33-
mvn versions:set -DnewVersion=$UPDATE_VERSION-SNAPSHOT
34-
mvn versions:update-child-modules
35-
mvn clean deploy -s ci_settings.xml
36-
echo "UPDATE_VERSION=$UPDATE_VERSION" >> $GITHUB_ENV
26+
java-version: '17.0.7'
27+
distribution: 'temurin'
28+
- name: Build with Maven
29+
run: mvn --batch-mode --update-snapshots verify

.github/workflows/deploy.yml

Lines changed: 59 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,71 @@ name: Deploy with Maven
22

33
on:
44
push:
5-
branches: [production]
5+
branches: [production, workflow-test]
66

77
jobs:
8-
build:
8+
create-jar:
99
runs-on: ubuntu-latest
10-
environment:
11-
name: production
12-
url: https://repo.andrei1058.dev
10+
outputs:
11+
version: ${{ steps.bump.outputs.version }}
1312
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up JDK 17.0.2
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
ref: 'production'
17+
- name: Set up JDK 17.0.7
1618
uses: actions/setup-java@v2
1719
with:
18-
java-version: '17.0.2'
19-
distribution: 'adopt'
20-
- name: Deploy with Maven
21-
env:
22-
MVN_REPO_USER: ${{ secrets.MVN_REPO_USER }}
23-
MVN_REPO_PASS: ${{ secrets.MVN_REPO_PASS }}
24-
ANDEV_API_TOKEN: ${{ secrets.ANDEV_API_TOKEN }}
25-
J_DOCS_USER: ${{ secrets.J_DOCS_USER }}
26-
J_DOCS_PASS: ${{ secrets.J_DOCS_PASS }}
27-
POLY_API_KEY: ${{ secrets.POLY_API_KEY }}
28-
POLY_RESOURCE_ID: "2167"
29-
run: |
30-
sudo apt install jq -y
31-
curl -X GET https://api.andrei1058.dev/v1/resources/2/versioning/candidate -H "Accept: application/json" >> version.json
32-
export UPDATE_VERSION=`jq '.version' version.json | tr -d '"'`
33-
mvn versions:set -DnewVersion=$UPDATE_VERSION
34-
mvn versions:update-child-modules
35-
mvn clean deploy -s ci_settings.xml
36-
mvn javadoc:javadoc
37-
sudo apt install -y -qq lftp
38-
lftp -c "set ftp:ssl-allow no; open -u $J_DOCS_USER,$J_DOCS_PASS javadocs.andrei1058.dev; mirror -Rev proxy-api/target/site/apidocs ./BedWarsProxy --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
39-
curl -F "file=@proxy-api/target/proxy-api-$UPDATE_VERSION.jar" -F api_key=$POLY_API_KEY -F resource_id=$POLY_RESOURCE_ID -F version="$UPDATE_VERSION" -F title="v$UPDATE_VERSION" -F message="For a detailed update log please visit https://github.com/andrei1058/BedWarsProxy/releases" "https://api.polymart.org/v1/postUpdate"
40-
curl -X PUT https://api.andrei1058.dev/v1/resources/2/versioning/commit -H "Accept: application/json" -H "Authorization: Bearer ${{ secrets.ANDEV_API_TOKEN }}" -H "Content-Type: application/json" --data '{"confirmation": true}' >> version.json
41-
echo "UPDATE_VERSION=$UPDATE_VERSION" >> $GITHUB_ENV
42-
- name: Create Tag
20+
java-version: '17.0.7'
21+
distribution: 'temurin'
22+
- name: Build with Maven
23+
run: mvn --batch-mode --update-snapshots package
24+
- name: Publish Artifact
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: proxy-plugin
28+
path: proxy-plugin/target/**.jar
29+
if-no-files-found: error
30+
release:
31+
runs-on: ubuntu-latest
32+
needs: [ create-jar ]
33+
permissions:
34+
contents: write
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v3
38+
with:
39+
ref: 'production'
40+
- name: Download the artifact
41+
uses: actions/download-artifact@v3
42+
with:
43+
name: proxy-plugin
44+
path: target
45+
- name: Create release
4346
uses: softprops/action-gh-release@v1
4447
with:
48+
target_commitish: production
49+
tag_name: ${{ needs.package.outputs.version }}
4550
generate_release_notes: true
46-
name: ${{env.UPDATE_VERSION}}
47-
tag_name: ${{env.UPDATE_VERSION}}
51+
files: "target/proxy-*"
52+
deploy-package:
53+
timeout-minutes: 2
54+
runs-on: ubuntu-latest
55+
needs: [ release ]
56+
permissions:
57+
contents: read
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v3
61+
with:
62+
ref: 'production'
63+
- name: Set up JDK 17.0.7
64+
uses: actions/setup-java@v2
65+
with:
66+
java-version: '17.0.7'
67+
distribution: 'temurin'
68+
- name: Deploy Package
69+
env:
70+
MAVEN_USERNAME: ${{ secrets.REPO_USER }}
71+
MAVEN_PASSWORD: ${{ secrets.REPO_PASS }}
72+
run: mvn --batch-mode clean deploy -s ci_settings.xml

.github/workflows/maven.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.gitlab-ci.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
[![Documentation](https://i.imgur.com/7QDbrIS.png)](https://andrei1058.gitbook.io/bedwarsproxy/) [![Report a Bug](https://i.imgur.com/Z1qOYLC.png)](https://gitlab.com/andrei1058/bedwarsproxy/-/issues) [![API](https://i.imgur.com/JfMTMMc.png)](http://javadoc.andrei1058.dev/BedWarsProxy/) [![Discord](https://i.imgur.com/yBySzkU.png)](https://discord.gg/XdJfN2X)
2+
[![Documentation](https://i.imgur.com/7QDbrIS.png)](https://wiki.tomkeuper.com/docs/BedWarsProxy/) [![Report a Bug](https://i.imgur.com/Z1qOYLC.png)](https://github.com/tomkeuper/BWProxy2023/issues) [![API](https://i.imgur.com/JfMTMMc.png)](https://javadocs.tomkeuper.com/) [![Discord](https://i.imgur.com/yBySzkU.png)](https://discord.gg/kPaBGwhmjf)
33

4-
**BedWarsProxy** is a plugin for Bungeecord networks that are running BedWars1058 in BUNGEE mode. This plugin provides features for lobby servers: join gui/ signs, placeholders and more.
4+
**BWProxy2023** is a plugin for Bungeecord networks that are running BedWars2023 in BUNGEE mode. This plugin provides features for lobby servers: join gui/ signs, placeholders and more.
55

66
![Signs](https://i.imgur.com/ggNRp4D.png?1)
77

@@ -19,24 +19,32 @@
1919

2020
**HOW TO USE**
2121

22-
All the information you need can be found on its [documentation/ wiki](https://andrei1058.gitbook.io/bedwarsproxy/).
22+
All the information you need can be found on its [documentation / wiki](https://wiki.tomkeuper.com/docs/BedWarsProxy/).
2323

2424
**DOWNLOAD**
25-
- [Latest release](https://www.spigotmc.org/resources/66642)
26-
- [Development builds](https://ci.codemc.io/job/andrei1058/job/BedWarsProxy/)
25+
- [Latest release](#)
26+
- [Development builds](https://github.com/tomkeuper/BWProxy2023/releases)
2727

2828
**MAVEN REPO**
2929
```xml
3030
<repository>
31-
<id>andrei1058-releases</id>
32-
<url>https://repo.andrei1058.dev/releases/</url>
31+
<id>bedwars2023-releases</id>
32+
<url>https://repo.tomkeuper.com/repository/releases/</url>
3333
</repository>
34+
35+
<!--Use for Snapshots only!-->
36+
<repository>
37+
<id>bedwars2023-snapshots</id>
38+
<url>https://repo.tomkeuper.com/repository/snapshots/</url>
39+
</repository>
40+
<!-- -->
41+
3442
<dependency>
35-
<groupId>com.andrei1058.bedwars</groupId>
43+
<groupId>com.tomkeuper.bedwars</groupId>
3644
<artifactId>proxy-api</artifactId>
37-
<version>VERSION HERE</version>
45+
<version>{version}</version>
3846
<scope>provided</scope>
3947
</dependency>
4048
```
4149

42-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8043171c9b8044f4a77b788d80a55d2f)](https://www.codacy.com/manual/andrew.dascalu/bedwarsproxy?utm_source=gitlab.com&amp;utm_medium=referral&amp;utm_content=andrei1058/bedwarsproxy&amp;utm_campaign=Badge_Grade) ![Servers](https://img.shields.io/bstats/servers/6036) ![Version](https://img.shields.io/spiget/version/66642) ![Chat](https://img.shields.io/discord/201345265821679617) ![Size](https://img.shields.io/spiget/download-size/66642) ![Downloads](https://img.shields.io/spiget/downloads/66642) ![Rating](https://img.shields.io/spiget/rating/66642) ![Versions](https://img.shields.io/spiget/tested-versions/66642)
50+
[![Discord](https://discordapp.com/api/guilds/760851292826107926/widget.png?style=shield)](https://discord.gg/kPaBGwhmjf) ![Servers](https://img.shields.io/bstats/servers/20358)

ci_settings.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
<settings>
22
<servers>
3-
<server>
4-
<id>gitlab-maven</id>
5-
<configuration>
6-
<httpHeaders>
7-
<property>
8-
<name>Job-Token</name>
9-
<value>${env.CI_JOB_TOKEN}</value>
10-
</property>
11-
</httpHeaders>
12-
</configuration>
13-
</server>
143
<server>
154
<id>ftp-repo</id>
165
<username>${env.FTP_USR}</username>

proxy-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<dependency>
184184
<groupId>com.iridium</groupId>
185185
<artifactId>IridiumColorAPI</artifactId>
186-
<version>1.0.6</version>
186+
<version>1.0.9</version>
187187
</dependency>
188188
<dependency>
189189
<groupId>redis.clients</groupId>

settings.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)