From d4e1fac0e1b21be3291dde1e2fbf94e81df12c2c Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Wed, 1 Feb 2023 13:19:43 -0500 Subject: [PATCH 1/3] Add a workflow for publishing to npm --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..e63ff68 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Publish + +on: + push: + tags: + - v* + +jobs: + publish: + name: Publish to npm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 14.x + registry-url: 'https://registry.npmjs.org' + + - name: install dependencies + run: yarn install --frozen-lockfile + + - name: auto-dist-tag + run: npx auto-dist-tag@1 --write + + - name: publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From be58e32093b99a4b99b579e32e5525b7f1b9c51b Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Wed, 1 Feb 2023 13:27:06 -0500 Subject: [PATCH 2/3] Add publish:false to npm setup for release it --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index f1358f7..5aa8f5f 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,9 @@ "github": { "release": true, "tokenRef": "GITHUB_AUTH" + }, + "npm": { + "publish": false } } } From 9d957f03aeb235672a6f49caf9079a050570c193 Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Wed, 1 Feb 2023 13:39:00 -0500 Subject: [PATCH 3/3] Update to use latest auto-dist-tag --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e63ff68..3d33328 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: run: yarn install --frozen-lockfile - name: auto-dist-tag - run: npx auto-dist-tag@1 --write + run: npx auto-dist-tag --write - name: publish to npm run: npm publish