Skip to content

Commit

Permalink
Merge branch 'master' into quality-of-life-tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDudeFromCI authored Jan 29, 2020
2 parents bdedc73 + f9c2101 commit 4a03a74
Show file tree
Hide file tree
Showing 16 changed files with 251 additions and 141 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:
- name: Build with Maven
uses: xlui/action-maven-cli/jdk8@master
with:
args: -B clean jacoco:prepare-agent package --file pom.xml jacoco:report sonar:sonar
args: -B clean javadoc:jar test jacoco:report sonar:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Show Error Logs
if: failure()
run: |
cat hs_err_pid*
rm hs_err_pid*
cat hs_err_pid* 2> /dev/null || true
rm hs_err_pid* 2> /dev/null || true
deploy:
name: Deploy
Expand All @@ -49,6 +49,7 @@ jobs:

steps:
- name: Generate build number
id: build_number
uses: einaregilsson/build-number@v2
with:
token: ${{secrets.github_token}}
Expand Down Expand Up @@ -78,4 +79,35 @@ jobs:
run: |
mkdir -p ~/.m2
echo "<settings><servers><server><id>github</id><username>${USERNAME}</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml
mvn -B clean deploy
mvn -B -DskipTests deploy
- name: Create Release Version
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: build_${{ steps.build_number.outputs.build_number }}
release_name: Build ${{ steps.build_number.outputs.build_number }}
draft: false
prerelease: true
body: |
Auto-generated Build ${{ steps.build_number.outputs.build_number }}.
- name: Create Zip Release
run: |
cp target/wraithengine-*.jar dist
cd dist
zip build *
cd ..
- name: Upload Release Zip
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/build.zip
asset_name: build_${{ steps.build_number.outputs.build_number }}.zip
asset_content_type: application/zip
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,79 @@
# WraithEngine
WraithEngine is a free, open-source, Java-based game engine built on top of LWJGL. It is designed to use high-level API for creating games quickly and easily. It is designed to allow users to be able to browse and modify the engine to fit their needs, and only apply components which are relivant for their projects.

## Getting Started
WraithEngine primarily uses Maven for package management, but for users who wish to use their own package management system, the jar file and dependencies can be found in the releases tab.

### Setting Up Maven
If your project uses a Maven workflow, the following dependency should be added to your pom.xml file:
```
<dependency>
<groupId>net.whg</groupId>
<artifactId>wraithengine</artifactId>
<version>BUILD_NUMBER</version>
</dependency>
```
Replace BUILD_NUMBER with the build number you wish to use, in the format `build_#`. Or, `build_3` to use build 3, for example.

As WraithEngine uses the Github Package Repository, you must also add this repository to your project in order to access WraithEngine. This can be done by modifying your Maven settings.xml file. This file is a Maven user settings file, which tells Maven useful tips such as what servers to check to resolve dependencies, and account information for logging in to those servers to access them. This file is found at `USER_HOME_FOLDER/.m2/settings.xml`.

For individuals using Linux, this is usually: `/home/USERNAME/.m2/settings.xml`
<br>
For individuals using Windows, this is usually: `C:\Users\USERNAME\.m2\settings.xml`
<br>
For individuals using Mac, this is usually: `/Users/USERNAME/.m2/settings.xml`

If you're using a custom workflow, you can also create a seperate settings.xml file specific to your current project. Simply use the `--settings PATH/TO/SETTINGS ` flag when calling Maven commands to use a custom settings file.

If the file does not exist, create it. After creating it, you want to add the following repositories and server tags. You should modify your file to look like this. (See profiles and servers) This basically tells Maven where to look for the WraithEngine package at. Due to how Github is set up, you also must have a Github API token created to allow you to download packages remotely, even though they're open source. This can be seen below in the `<servers>` tag.

```
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<name>GitHub thedudefromci Apache Maven Packages</name>
<url>https://maven.pkg.github.com/thedudefromci/WraithEngine</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>USERNAME</username>
<password>API_TOKEN</password>
</server>
</servers>
</settings>
```

Replace `USERNAME` with your Github username in all lowercase letters. Replace `API_TOKEN` with your Github API token.

If you're unsure how to create a Github API token, go into your user settings, and select Developer settings. Select Personal Access Tokens, and generate a new token that specific to the device you are working on. Make sure to give it the "read:packages" flag.

**Note:**
Keep this token secret! This is a basically a password which allows software to access your account. This should be kept a secret! If your API token is ever compromised, delete it and create a new token.

## Contributing
WraithEngine is open-source and community-driven. All contributions are welcome and highly encouraged! If you see an area of the project which is lacking, feel free to open an issue or submit a pull request. If you want to help but aren't sure where to start:

Expand Down
Loading

0 comments on commit 4a03a74

Please sign in to comment.