Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew121410 committed Aug 9, 2024
1 parent 038a464 commit d5549bb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI with Gradle
name: Build and Release

on:
push:
Expand All @@ -8,10 +8,15 @@ jobs:
build:

runs-on: ubuntu-latest
env:
MY_JAR: "build/libs/World1-6Elevators.jar"

steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout

- name: Setup Gradle # https://github.com/gradle/actions
uses: gradle/actions/setup-gradle@v4

- name: Chmod Gradlew
run: chmod +x ./gradlew

Expand All @@ -22,13 +27,11 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Build with Gradle # https://github.com/gradle/gradle-build-action -> https://github.com/gradle/actions
uses: gradle/actions/setup-gradle@v3
with:
arguments: build
- name: Build with Gradle
run: ./gradlew build

- name: Generate sha256sum
run: sha256sum build/libs/World1-6Elevators.jar >> hash.txt
run: sha256sum "$MY_JAR" >> hash.txt

- name: Deploy Release With Artifact
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -37,5 +40,5 @@ jobs:
automatic_release_tag: "latest"
prerelease: false
files: |
build/libs/World1-6Elevators.jar
${{ env.MY_JAR }}
hash.txt

0 comments on commit d5549bb

Please sign in to comment.