From 2a8a817b0bfe2768b99fd0f2cdc8248a7ffdf4e9 Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Mon, 4 Nov 2024 18:32:31 +0700 Subject: [PATCH] ci: add automated publishing for core and static (#63) Signed-off-by: Tierney Cyren --- .github/workflows/publish-core.yml | 22 ++++++++++++++++++++++ .github/workflows/publish-static.yml | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/publish-core.yml create mode 100644 .github/workflows/publish-static.yml diff --git a/.github/workflows/publish-core.yml b/.github/workflows/publish-core.yml new file mode 100644 index 00000000..ff466842 --- /dev/null +++ b/.github/workflows/publish-core.yml @@ -0,0 +1,22 @@ +name: Publish @nodevu/core to npmjs +on: + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + registry-url: 'https://registry.npmjs.org' + - run: npm install -w core + - run: npm run lint -w core + - run: npm run coverage -w core + - run: npm publish --provenance --access public -w core + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-static.yml b/.github/workflows/publish-static.yml new file mode 100644 index 00000000..7f5cb883 --- /dev/null +++ b/.github/workflows/publish-static.yml @@ -0,0 +1,22 @@ +name: Publish @nodevu/static to npmjs +on: + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + registry-url: 'https://registry.npmjs.org' + - run: npm install -w static + - run: npm run lint -w static + - run: npm run coverage -w static + - run: npm publish --provenance --access public -w static + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}