From 22bec54a1c0c92e2923be36301a1e762fd5330bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9lemy=20Laurans?= Date: Wed, 10 Apr 2024 21:38:32 +0200 Subject: [PATCH] Add CI for publish --- .github/workflows/publish.yml | 16 ++++++++++++++++ .yarnrc.yml | 6 ++++++ 2 files changed, 22 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..fd13262 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +name: Publish to npm +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install dependencies + run: yarn + - name: Publish to npm + run: yarn npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.yarnrc.yml b/.yarnrc.yml index e810c2b..8ee62a5 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,2 +1,8 @@ yarnPath: .yarn/releases/yarn-4.1.1.cjs enableGlobalCache: false +npmPublishAccess: "public" +npmScopes: + bartheleway: + npmPublishRegistry: "https://registry.npmjs.org" + npmAlwaysAuth: true + npmAuthToken: "${NODE_AUTH_TOKEN}"