1
1
name : Nightly Build
2
2
on :
3
- workflow_dispatch :
4
- schedule :
5
- - cron : ' 0 2 * * *'
3
+ workflow_dispatch
4
+ # schedule:
5
+ # - cron: '0 2 * * *'
6
6
7
7
jobs :
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')
19
19
20
20
build-natives :
21
21
name : Build native images
22
22
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' }}
25
25
strategy :
26
26
matrix :
27
27
os : [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]
@@ -36,20 +36,20 @@ jobs:
36
36
distribution : ' graalvm'
37
37
github-token : ${{ secrets.GITHUB_TOKEN }}
38
38
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
40
40
shell : bash
41
41
run : |
42
42
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
44
44
- uses : actions/upload-artifact@v3
45
45
with :
46
46
name : natives
47
47
path : cli/target/*.tar.gz
48
48
49
49
build :
50
50
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' }}
53
53
runs-on : ubuntu-latest
54
54
steps :
55
55
- name : Checkout code
@@ -65,32 +65,32 @@ jobs:
65
65
run : |
66
66
mvn -B -ntp -Dstyle.color=always install
67
67
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
87
73
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