MatrixOne-v1.0.2 #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: release | |
on: | |
release: | |
types: [published] | |
jobs: | |
linux-amd64-build-job: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Use Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Build normal | |
run: | | |
make build | |
zip -r mo-linux-x86_64.zip mo-service ./etc/launch ./etc/launch-with-python-udf-server ./pkg/udf/pythonservice/pyserver | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
- name: Echo some info | |
run: | | |
echo ${{ steps.get_release.outputs.upload_url }} | |
echo ${{ steps.get_release.outputs.tag_name }} | |
- name: Upload Release normal linux x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./mo-linux-x86_64.zip | |
asset_name: mo-${{ steps.get_release.outputs.tag_name }}-linux-x86_64.zip | |
asset_content_type: application/zip | |
linux-arm64-build-job: | |
runs-on: aws-arm64-runner | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Use Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Build normal | |
run: | | |
make build | |
zip -r mo-linux-arm64.zip mo-service ./etc/launch ./etc/launch-with-python-udf-server ./pkg/udf/pythonservice/pyserver | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
- name: Echo some info | |
run: | | |
echo ${{ steps.get_release.outputs.upload_url }} | |
echo ${{ steps.get_release.outputs.tag_name }} | |
- name: Upload Release normal linux arm64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./mo-linux-arm64.zip | |
asset_name: mo-${{ steps.get_release.outputs.tag_name }}-linux-arm64.zip | |
asset_content_type: application/zip | |
darwin-x86-build-job: | |
runs-on: macos-latest | |
steps: | |
# GitHub Hosted MacOS runner cannot connect to time.apple.com, so use time.windows.com | |
- name: Sync System Time | |
run: | | |
set +e; | |
for i in {1..10}; do | |
sudo sntp -sS time.windows.com; | |
if [ "$?" == "0" ]; then | |
exit 0; | |
fi | |
done | |
exit 1; | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Use Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Build normal | |
run: | | |
make build | |
- name: Import Code-Signing Certificates | |
uses: Apple-Actions/import-codesign-certs@v1 | |
with: | |
# The certificates in a PKCS12 file encoded as a base64 string | |
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} | |
# The password used to import the PKCS12 file. | |
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} | |
- name: Install gon | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '1' | |
repository: matrixorigin/gon | |
ref: master | |
path: ./gon | |
- name: Build gon | |
run: | | |
cd $GITHUB_WORKSPACE/gon; | |
make; | |
chmod +x gon; | |
echo "$(pwd)" >> $GITHUB_PATH; | |
- name: Code signing and app notarization | |
env: | |
AC_PASSWORD: ${{ secrets.AC_PASSWORD }} | |
AC_PROVIDER: ${{ secrets.AC_PROVIDER }} | |
run: | | |
cd $GITHUB_WORKSPACE | |
cp ./optools/sign/gon.json ./gon.json | |
gon -log-json ./gon.json | |
unzip -d ./mo-macos11 mo-macos11.zip | |
mkdir -p ./mo-macos11/etc | |
cp -r ./etc/launch ./mo-macos11/etc/ | |
cd ./mo-macos11 | |
spctl -a -vvv -t install mo-service | |
codesign --test-requirement="=notarized" -vv mo-service | |
zip -r mo-darwin-x86_64.zip mo-service ./etc/launch ./etc/launch-with-python-udf-server ./pkg/udf/pythonservice/pyserver | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
- name: Upload Release normal darwin x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./mo-macos11/mo-darwin-x86_64.zip | |
asset_name: mo-${{ steps.get_release.outputs.tag_name }}-darwin-x86_64.zip | |
asset_content_type: application/zip | |
#if the release for darwin-arm is failed, please contact guguducken to check runner status | |
darwin-arm-build-job: | |
runs-on: mac-arm64-mini | |
steps: | |
- name: Sync system time | |
run: | | |
set +e; | |
for i in {1..10}; do | |
sudo sntp -sS time.apple.com; | |
if [ "$?" == "0" ]; then | |
exit 0; | |
fi | |
done | |
exit 1; | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Check go version | |
run: | | |
go version | |
- name: Build normal | |
run: | | |
make build | |
- name: Unlock Code-Signing Certificates | |
run: | | |
security unlock-keychain -p ${{ secrets.SIGN_KEYCHAIN_PASSWORD }} mo_sign.keychain | |
- name: Code signing and app notarization | |
env: | |
AC_PASSWORD: ${{ secrets.AC_PASSWORD }} | |
AC_PROVIDER: ${{ secrets.AC_PROVIDER }} | |
run: | | |
cp ./optools/sign/gon.json ./gon.json | |
cat ./gon.json | |
gon -log-json ./gon.json | |
unzip -d ./mo-macos11 mo-macos11.zip | |
mkdir -p ./mo-macos11/etc | |
cp -r ./etc/launch ./mo-macos11/etc/ | |
cd ./mo-macos11 | |
spctl -a -vvv -t install mo-service | |
codesign --test-requirement="=notarized" -vv mo-service | |
zip -r mo-darwin-arm64.zip mo-service ./etc/launch ./etc/launch-with-python-udf-server ./pkg/udf/pythonservice/pyserver | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
- name: Upload Release normal darwin arm64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_ACTION }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./mo-macos11/mo-darwin-arm64.zip | |
asset_name: mo-${{ steps.get_release.outputs.tag_name }}-darwin-arm64.zip | |
asset_content_type: application/zip | |
- name: Lock Code-Signing Certificates | |
if: ${{ always() }} | |
run: | | |
security lock-keychain mo_sign.keychain |