Skip to content

update ci && build shell #15

update ci && build shell

update ci && build shell #15

Workflow file for this run

name: Build OpenSSL static libraries
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone main branch
uses: actions/checkout@v4
- id: setup-ndk
name: Setup NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r25b
- name: Build OpenSSL
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
chmod +x ./build_android_openssl.sh && ./build_android_openssl.sh
# deploy openssl/* to new branch
- name: Deploy OpenSSL Branch
if: ${{ !github.event.pull_request }}
run: |
version=$(find . -name "openssl-*.tar.gz" | sed -e 's/.*openssl-\(.*\).tar.gz/\1/')
pushd openssl
git init
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
if [ -z "$(git status --porcelain)" ]; then
echo "The BUILD_DIR is setting error or nothing produced" && \
echo "Exiting..."
exit 0
fi
git add .
git commit -m "Build OpenSSL $version"
git push --force "https://username:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" master:openssl-$version
rm -rf .git
popd
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ !github.event.pull_request }}
with:
path: 'openssl/*'
name: build_output_${{ github.event.head_commit.id }}.zip