Skip to content

Commit

Permalink
Update gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thalals authored Feb 15, 2024
1 parent d2a7fa9 commit 712a15d
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,58 @@ on:
push:
branches:
- main

jobs:
build:
job1:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: CheckOut
uses: actions/checkout@v4
with:
token: ${{ secrets.ACTION_TOKEN }}
submodules: true

- name: Set up JDK 17
uses:
actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
- name: Build with Gradle
run:
./gradlew -version
./gradlew clean build

steps:
- name: CheckOut
uses: actions/checkout@v4
with:
token: ${{ secrets.ACTION_TOKEN }}
submodules: true

- name: Set up JDK 17
uses:
actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
job2:
- needs: job1
- name: ls
run: ls

- name: Setup Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0

- name: Build with Gradle
run:
./gradlew -version
./gradlew clean build

- name: ls
run: ls

# - name: AWS credential
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-region: ${{ secrets.AWS_REGION }}
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
#
#
# - name: Upload to AWS S3
# run: aws s3 cp ./build/libs/chatserver-0.0.1-SNAPSHOT.jar s3://${{ secrets.S3_DEPLOY_BUCKET }}/chatserver-0.0.1-SNAPSHOT-`date +%Y%m%d`.jar
#
#
# - name: Deploy EC2
# run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=cicdtest/$GITHUB_SHA.zip,bundleType=zip
#
#
# # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# # the publishing section of your build.gradle
# - name: Publish to GitHub Packages
Expand Down

0 comments on commit 712a15d

Please sign in to comment.