1010 - ' **'
1111
1212jobs :
13- build :
14- name : Migtool build
13+ build-linux :
14+ name : Migtool build for linux-x86
1515 if : " !contains(github.event.head_commit.message, '[ci skip]')"
1616 runs-on : ubuntu-latest
1717 timeout-minutes : 90
2323 run : env | sort
2424
2525 - name : Checkout
26- uses : actions/checkout@v1
26+ uses : actions/checkout@v4
2727 with :
2828 fetch-depth : 1
2929
5252 - name : Upload linux native image artifact
5353 uses : actions/upload-artifact@v4
5454 with :
55- name : migtool-linux
55+ name : migtool-linux-x86
5656 path : build/native/nativeCompile/migtool
5757 overwrite : true
5858
@@ -69,10 +69,73 @@ jobs:
6969 path : build/reports/tests/nativeCliTest/
7070 overwrite : true
7171
72+ build-macos :
73+ name : Migtool build for MacOS-arm64
74+ if : " !contains(github.event.head_commit.message, '[ci skip]')"
75+ runs-on : macos-latest
76+ timeout-minutes : 90
77+ strategy :
78+ fail-fast : false
79+
80+ steps :
81+ - name : Environment
82+ run : env | sort
83+
84+ - name : Checkout
85+ uses : actions/checkout@v4
86+ with :
87+ fetch-depth : 1
88+
89+ - name : Setup Graalvm
90+ uses : graalvm/setup-graalvm@v1
91+ with :
92+ java-version : ' 21'
93+ distribution : ' graalvm'
94+ github-token : ${{ secrets.GITHUB_TOKEN }}
95+ native-image-job-reports : ' true'
96+
97+ - name : Build Native Image
98+ run : ./gradlew nativeCompile
99+
100+ - name : Codesign binary
101+ if : contains(github.event.head_commit.message, '[release]') && github.event.ref == 'refs/heads/master'
102+ env :
103+ MACOS_CERTIFICATE : ${{ secrets.MACOS_CERTIFICATE }}
104+ MACOS_CERTIFICATE_PWD : ${{ secrets.MACOS_CERTIFICATE_PWD }}
105+ MACOS_CERTIFICATE_NAME : ${{ secrets.MACOS_CERTIFICATE_NAME }}
106+ MACOS_CI_KEYCHAIN_PWD : ${{ secrets.MACOS_CI_KEYCHAIN_PWD }}
107+ run : |
108+ echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
109+ security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
110+ security default-keychain -s build.keychain
111+ security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
112+ security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
113+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
114+ /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime build/native/nativeCompile/migtool -v
115+
116+ - name : Notarize binary
117+ if : contains(github.event.head_commit.message, '[release]') && github.event.ref == 'refs/heads/master'
118+ env :
119+ MACOS_AC_API_CERT : ${{ secrets.MACOS_AC_API_CERT }}
120+ MACOS_AC_API_ISSUER_ID : ${{ secrets.MACOS_AC_API_ISSUER_ID }}
121+ MACOS_AC_API_KEY_ID : ${{ secrets.MACOS_AC_API_KEY_ID }}
122+ run : |
123+ echo $MACOS_AC_API_CERT | base64 --decode > AuthKey.p8
124+ xcrun notarytool store-credentials "notarytool-profile" -k AuthKey.p8 -d "$MACOS_AC_API_KEY_ID" -i "$MACOS_AC_API_ISSUER_ID"
125+ ditto -c -k --keepParent "build/native/nativeCompile/migtool" "notarization.zip"
126+ xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
127+
128+ - name : Upload MacOS native image artifact
129+ uses : actions/upload-artifact@v4
130+ with :
131+ name : migtool-macos-arm64
132+ path : build/native/nativeCompile/migtool
133+ overwrite : true
134+
72135 release :
73136 name : Release
74137 if : " contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
75- needs : [ build ]
138+ needs : [ build-linux, build-macos ]
76139 runs-on : ubuntu-latest
77140 steps :
78141 - name : Checkout repository
94157 run : |
95158 VERSION=$(cat ./VERSION)
96159 echo "VERSION = $VERSION"
97- echo "::set-output name= VERSION:: $VERSION"
160+ echo "VERSION= $VERSION" >> $GITHUB_OUTPUT
98161
99162 - name : Run JReleaser
100163 uses : jreleaser/release-action@v2
0 commit comments