Skip to content

Commit

Permalink
Add github action latest_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaarkies committed Apr 23, 2020
1 parent d3b7881 commit 8719644
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 20 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/latest_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Package latest release

on:
push:
branches: [ master ]
tags:
- '*'

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1

- name: Setup java compiler
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Fix gradlew file permissions
run: chmod +x ./gradlew

- name: Run gradle script
uses: eskatos/gradle-command-action@v1
with:
arguments: package

- name: Assemble package
run: zip -r volynov.zip build/Volynov-0.0.0/*

- name: It should create a release with assets README.md and LICENCE
uses: Xotl/cool-github-releases@v1
with:
mode: update
tag_name: latest-build
release_name: "Latest build"
body_mrkdwn: "### Download the volynov.zip file\n Unzip it into a folder, and run the run.bat file"
assets: volynov.zip
replace_assets: true
github_token: ${{ github.token }}
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ sourceSets {
tasks {

withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.jvmTarget = "1.8"
}

register<Zip>("zipFolder") {
Expand All @@ -105,9 +105,9 @@ tasks {
File("$buildDir/libs/run.bat")
.writeText("""|java -Dorg.lwjgl.util.Debug=true -jar .\volynov-$version-uber.jar
|pause """.trimMargin())
File("$buildDir/libs/run_with_jbr_here.bat")
.writeText("""|.\jbr\bin\java.exe -Dorg.lwjgl.util.Debug=true -jar .\volynov-$version-uber.jar
|pause """.trimMargin())
// File("$buildDir/libs/run_with_jbr_here.bat")
// .writeText("""|.\jbr\bin\java.exe -Dorg.lwjgl.util.Debug=true -jar .\volynov-$version-uber.jar
// |pause """.trimMargin())
File("$buildDir/libs/config.txt")
.writeText("""|isDebugMode=0
""".trimMargin())
Expand Down
8 changes: 1 addition & 7 deletions src/main/kotlin/app/AppLogic.kt
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package app

import display.Window
import display.draw.Drawer
import display.draw.TextureHolder
import display.graphic.Renderer
import display.Window
import engine.GameState
import game.GamePhaseHandler
import input.InputHandler
import javafx.application.Application.launch
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import org.lwjgl.stb.STBImage

class AppLogic : IGameLogic {

Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/display/Window.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package display

import display.events.KeyboardEvent
import display.events.MouseButtonEvent
import display.events.MouseScrollEvent
import io.reactivex.subjects.PublishSubject
Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/display/draw/Drawer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import engine.physics.CellLocation
import engine.physics.GravityCell
import game.GamePlayer
import org.jbox2d.common.Vec2
import org.lwjgl.opengl.GL11
import org.lwjgl.opengl.GL12
import utility.Common.makeVec2
import utility.Common.makeVec2Circle
import utility.Common.vectorUnit
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/display/events/KeyboardEvent.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package display
package display.events

class KeyboardEvent(val key: Int, val scancode: Int, val action: Int, val mods: Int)
1 change: 0 additions & 1 deletion src/main/kotlin/display/graphic/Texture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11.*
import org.lwjgl.stb.STBImage
import org.lwjgl.system.MemoryStack
import utility.Common.getSafePath
import java.io.File
import java.nio.ByteBuffer

class Texture {
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/display/gui/GuiButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import display.graphic.Color
import display.graphic.SnipRegion
import display.text.TextJustify
import org.jbox2d.common.Vec2
import utility.Common.vectorUnit

class GuiButton(
drawer: Drawer,
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/engine/physics/Gravity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Gravity {
fun addGravityForces(freeBodies: List<FreeBody>): Pair<HashMap<CellLocation, GravityCell>, Float> = runBlocking {
val gravityMap = HashMap<CellLocation, GravityCell>()

val resolution = 2f
val resolution = 20f//2f
freeBodies.forEach {
val x = it.worldBody.position.x
val y = it.worldBody.position.y
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/game/GamePhaseHandler.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package game

import display.KeyboardEvent
import display.events.KeyboardEvent
import display.Window
import display.draw.Drawer
import display.draw.TextureEnum
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/game/PlayerAim.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package game

import utility.Common
import utility.Common.Pi2
import utility.Common.radianToDegree

Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/utility/Common.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package utility

import org.jbox2d.common.MathUtils
import org.jbox2d.common.Vec2
import java.io.File
import java.nio.DoubleBuffer
Expand Down

0 comments on commit 8719644

Please sign in to comment.