Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroSquared committed Jan 13, 2024
1 parent a7a44ef commit dd7ab41
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Release
on: [push]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
cache: gradle

- name: Build with Gradle
run: gradle -Pversion=${{ github.run_number }} build

- name: Move JARs
run: mkdir staging && cp build/libs/*.jar staging

- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
title: Build ${{ github.run_number }}
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "v${{ github.run_number }}"
files: |
staging/moosic-${{ github.run_number }}.jar
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ dependencies {
test {
useJUnitPlatform()
}

jar {
manifest {
attributes(
'Main-Class': 'Main'
)
}
}

0 comments on commit dd7ab41

Please sign in to comment.