From 28a38e62a4a97b3a557cae8410574800c30d1ea4 Mon Sep 17 00:00:00 2001 From: RoBorg Date: Mon, 16 Oct 2023 16:05:33 +0100 Subject: [PATCH] Publish package --- .github/workflows/publish.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..b1f6a1a --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,28 @@ +name: Publish package +on: + release: + types: [published] +jobs: + build-and-publish: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '16' + - run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} + + - name: Publish package + env: + VERSION: ${{ github.event.release.tag_name }} + run: | + git config --global user.email "it@stickee.co.uk" + git config --global user.name "Github Actions" + npm version "$VERSION" + npm publish