Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakambda committed Aug 5, 2023
1 parent b9da41b commit abdf865
Showing 1 changed file with 18 additions and 45 deletions.
63 changes: 18 additions & 45 deletions .github/workflows/gradle_ci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
name: CI
name: Build

on: [ push ]

env:
APP_JAVA_VERSION: 20
on:
push:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ env.APP_JAVA_VERSION }}

- name: Build project
uses: gradle/[email protected]
with:
arguments: |
check
build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: shadow-jar
path: build/libs/filesecure-shaded.jar
uses: Rakambda/rakambda-github-workflows/.github/workflows/gradle-build.yml@main
with:
java-version: ${{ vars.JAVA_VERSION }}
artifact-name: Gradle-Libs

dropbox:
name: Deploy Dropbox
concurrency: dropbox
runs-on: ubuntu-latest
needs: build
if: contains('refs/heads/main', github.ref)
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: shadow-jar
- name: Deploy on Dropbox
uses: deka0106/[email protected]
with:
dropbox_access_token: ${{ secrets.DROPBOX_DEPLOY_TOKEN }}
src: "filesecure-shaded.jar"
dest: "/Documents/JARs/FileSecure.jar"
mode: overwrite
uses: Rakambda/rakambda-github-workflows/.github/workflows/dropbox-publish-artifact.yml@main
if: github.ref == ${{ github.event.repository.default_branch }}
needs:
- build
with:
artifact-name: Gradle-Libs
source: "filesecure-shaded.jar"
target: "/Documents/JARs/FileSecure.jar"
secrets:
dropbox-token: ${{ secrets.DROPBOX_TOKEN }}

0 comments on commit abdf865

Please sign in to comment.