-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up automatic building #31
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but some changes should be considered before hand.
.github/workflows/build.yml
Outdated
with: | ||
name: jars | ||
path: build/libs | ||
if-no-files-found: error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "warn" instead of error because otherwise, it would always assume compilation failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, but I used error so that if building jars didn't produce any jars, the build would tell you that something is wrong.
.github/workflows/build.yml
Outdated
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Install Java 17 | ||
uses: actions/setup-java@v3.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use ".9.0" in setup-java context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
.github/workflows/build.yml
Outdated
uses: actions/setup-java@v3.9.0 | ||
with: | ||
java-version: 17 # Can be more specific if neccesary | ||
distribution: adopt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"temurin" should go here instead of adopt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
.github/workflows/build.yml
Outdated
- uses: actions/checkout@v2 | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this to checkout v3 please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
0089903
to
d1c9e0e
Compare
This commit adds multiple actions to build.yml that download java 17, build the mod, and upload the jars to Github Actions.
d1c9e0e
to
241049a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
This pull request sets up automated compiling and building via Github Actions. The action will create an artifact named "jars" that contains both the distribution jar and the sources jar. To see what the build process looks like, approve this workflow.
This pull request is best suited for rebasing due to only containing a single commit.