From e53a268508c9688cd15c35dd9798b5fef7099993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 19 Dec 2021 18:28:48 +0000 Subject: [PATCH] feat: setup GitHub CI --- .github/workflows/build_and_publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/build_and_publish.yml diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml new file mode 100644 index 0000000..8979ee6 --- /dev/null +++ b/.github/workflows/build_and_publish.yml @@ -0,0 +1,24 @@ +name: Build and Publish +on: [push, pull_request] +jobs: + build_and_publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: 🛎️ Checkout + uses: actions/checkout@v2 + - name: 🛠️ Configure Registry + uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://npm.pkg.github.com' + scope: '@unlock-music' + - name: 📦 Install Dependencies + run: npm ci + - name: 🚀 Publish Package + run: npm publish + if: startsWith(github.ref, 'refs/tags/v') + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}