From 9eebd040b713af3618ca5f73886c50848b9acd4b Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Sat, 17 Dec 2022 18:31:55 +0800 Subject: [PATCH] chore: add installer check to ci --- .github/workflows/install.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/install.yml diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 000000000..18f030da9 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,46 @@ +name: Install + +on: + push: + paths: + - '.github/workflows/install.yml' + - 'package.json' + - 'scripts/**' + +jobs: + pack: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - run: | + jq -c '.version = "1.0.0"' package.json > tmp.$$.json + mv tmp.$$.json package.json + npm pack + + - uses: actions/upload-artifact@v3 + with: + name: installer + path: supabase-1.0.0.tgz + + install: + needs: pack + strategy: + matrix: + pm: [npm, yarn] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/download-artifact@v3 + with: + name: installer + + - run: npm init -y + + - if: ${{ matrix.pm == 'npm' }} + run: npm i --save-dev ./supabase-1.0.0.tgz + + - if: ${{ matrix.pm == 'yarn' }} + run: yarn add -D ./supabase-1.0.0.tgz + + - run: npx supabase --version