From 585e9ccd20cbb7385c28620e47bd76c37a363404 Mon Sep 17 00:00:00 2001 From: Lars Vierbergen Date: Tue, 8 Aug 2023 10:16:11 +0200 Subject: [PATCH] Add CI workflow to test and publish packages --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..95cfc5c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: build +on: + push: + pull_request: + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: "0" + - uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + scope: '@contentgrid' + - run: yarn install --frozen-lockfile + - name: Test + run: yarn test + - name: Publish + if: ${{ github.ref_type == 'tag' }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn lerna publish ${{ github.ref_name }} --no-verify-access --yes --no-push