From cb37eb3308ff3ba537496746eae814885aa84233 Mon Sep 17 00:00:00 2001 From: Johannes Homeier Date: Sat, 18 Nov 2023 11:30:33 +0100 Subject: [PATCH] ci: add workflow to publish the composables lib --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..39bc643 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish to npmjs.org + +on: + release: + types: [published] + +jobs: + publish: + name: Publish to NPM + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npx nx build composables + + - name: Publish + working-directory: ./dist/composables + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}