From 61b6e557802a81b07984a001be5767d211f18c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Thu, 1 Aug 2024 18:02:53 +0200 Subject: [PATCH] Add publish workflow. --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..2a26223 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish package + +on: + release: + types: [ created ] + +jobs: + publish-npm: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'yarn' + registry-url: 'https://registry.npmjs.org' + - run: yarn install --immutable + - run: yarn build + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}