From 5c127f0d300eda0f5add21d04497eed8114ddc15 Mon Sep 17 00:00:00 2001 From: xiaokang00010 Date: Thu, 25 Apr 2024 18:07:49 +0800 Subject: [PATCH] feat: add github workflow --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f787ff6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + +jobs: + linux: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.20.2] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - run: | + npm install + + - name: Prebuils + run: | + npx expo prebuild + + - name: Build + - run: | + cd android; ./gradlew assembleRelease + + + - name: upload artifacts + uses: actions/upload-artifact@v2 + with: + name: android-build + path: android/app/build/outputs + \ No newline at end of file