11name : Nightly Build
22on :
3- workflow_dispatch :
4- schedule :
5- - cron : ' 0 2 * * *'
3+ workflow_dispatch
4+ # schedule:
5+ # - cron: '0 2 * * *'
66
77jobs :
8- verify_commit :
9- runs-on : ubuntu-latest
10- name : Verify latest commit
11- outputs :
12- RUN_BUILD : ${{ steps.verify_commit.outputs.RUN_BUILD }}
13- steps :
14- - uses : actions/checkout@v3
15- - id : verify_commit
16- name : Verify latest commit is less than 24 hours
17- if : ${{ (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch') }}
18- run : echo '::set-output name=RUN_BUILD::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
8+ # verify_commit:
9+ # runs-on: ubuntu-latest
10+ # name: Verify latest commit
11+ # outputs:
12+ # RUN_BUILD: ${{ steps.verify_commit.outputs.RUN_BUILD }}
13+ # steps:
14+ # - uses: actions/checkout@v3
15+ # - id: verify_commit
16+ # name: Verify latest commit is less than 24 hours
17+ # if: ${{ (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch') }}
18+ # run: echo '::set-output name=RUN_BUILD::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
1919
2020 build-natives :
2121 name : Build native images
2222 runs-on : ${{ matrix.os }}
23- needs : verify_commit
24- if : ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
23+ # needs: verify_commit
24+ # if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
2525 strategy :
2626 matrix :
2727 os : [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]
@@ -36,20 +36,20 @@ jobs:
3636 distribution : ' graalvm'
3737 github-token : ${{ secrets.GITHUB_TOKEN }}
3838 native-image-job-reports : ' true'
39- - name : Build native images with nativ maven plugin and extract in tar.gz
39+ - name : Build native images with native maven plugin and archive in tar.gz
4040 shell : bash
4141 run : |
4242 cd cli
43- mvn -B -ntp -Pnative -P!include-docs -DskipTests=true package
43+ mvn -B -ntp -P${{ matrix.os }} -P!include-docs -DskipTests=true package
4444 - uses : actions/upload-artifact@v3
4545 with :
4646 name : natives
4747 path : cli/target/*.tar.gz
4848
4949 build :
5050 name : Build Project and Deploy
51- needs : [ build-natives, verify_commit ]
52- if : ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
51+ needs : [ build-natives ]
52+ # if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
5353 runs-on : ubuntu-latest
5454 steps :
5555 - name : Checkout code
@@ -65,32 +65,32 @@ jobs:
6565 run : |
6666 mvn -B -ntp -Dstyle.color=always install
6767 mv ./natives/* ./cli/target/
68- - name : Deploy to OSSRH nexus
69- env :
70- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
71- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
72- run : mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -P deploy deploy
73-
74- check_status :
75- runs-on : ubuntu-latest
76- needs : verify_commit
77- if : ${{ needs.verify_commit.outputs.RUN_BUILD == 'false' }}
78- steps :
79- - name : Check last workflow status
80- id : check_status
81- run : |
82- workflow_filename="nightly-build.yml"
83- last_workflow=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
84- "https://api.github.com/repos/${{ github.repository }}/actions/workflows/$workflow_filename/runs?per_page=1" | jq -r '.workflow_runs[0]')
85- conclusion=$(echo $last_workflow | jq -r '.conclusion')
86- echo "conclusion=$conclusion" >> $GITHUB_ENV
68+ # - name: Deploy to OSSRH nexus
69+ # env:
70+ # SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
71+ # SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
72+ # run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -P deploy deploy
8773
88- - name : Print and handle the status
89- run : |
90- echo "The status of the last workflow run is: ${{ env.conclusion }}"
91- if [ "${{ env.conclusion }}" != "success" ]; then
92- echo "The last workflow did not succeed. Failing this workflow."
93- exit 1
94- else
95- echo "The last workflow succeeded. This workflow will succeed."
96- fi
74+ # check_status:
75+ # runs-on: ubuntu-latest
76+ # needs: verify_commit
77+ # if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'false' }}
78+ # steps:
79+ # - name: Check last workflow status
80+ # id: check_status
81+ # run: |
82+ # workflow_filename="nightly-build.yml"
83+ # last_workflow=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
84+ # "https://api.github.com/repos/${{ github.repository }}/actions/workflows/$workflow_filename/runs?per_page=1" | jq -r '.workflow_runs[0]')
85+ # conclusion=$(echo $last_workflow | jq -r '.conclusion')
86+ # echo "conclusion=$conclusion" >> $GITHUB_ENV
87+ #
88+ # - name: Print and handle the status
89+ # run: |
90+ # echo "The status of the last workflow run is: ${{ env.conclusion }}"
91+ # if [ "${{ env.conclusion }}" != "success" ]; then
92+ # echo "The last workflow did not succeed. Failing this workflow."
93+ # exit 1
94+ # else
95+ # echo "The last workflow succeeded. This workflow will succeed."
96+ # fi
0 commit comments