From f851bc533769286846ea9d2dc64281b13bffd4da Mon Sep 17 00:00:00 2001 From: Elliot Evans Date: Tue, 5 Sep 2023 12:25:55 +0100 Subject: [PATCH] feat(): added workflow for publish --- .github/publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/publish.yml diff --git a/.github/publish.yml b/.github/publish.yml new file mode 100644 index 0000000..9d53b85 --- /dev/null +++ b/.github/publish.yml @@ -0,0 +1,23 @@ +name: Publish package to GitHub Packages +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to GitHub Packages + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://npm.pkg.github.com' + # Defaults to the user or organization that owns the workflow file + scope: 'elliot-evans-95' + - run: npm build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}