From 502dde8d2fd09aba1d237d4d4b3346d70fcf56f0 Mon Sep 17 00:00:00 2001 From: Tyson Williams Date: Sat, 5 Sep 2020 13:49:35 -0500 Subject: [PATCH 1/3] added GitHub workflow to publish to NPM's public registry --- .github/workflows/npm-publish.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..556ed44 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,27 @@ +# Based on template copied from https://github.com/marketplace/actions/publish-to-npm#usage +name: npm-publish +on: + push: + branches: + - master +jobs: + npm-publish: + name: npm-publish + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + - name: Set up Node.js + uses: actions/setup-node@master + with: + node-version: 12.0.0 + - name: Publish if version has been updated + uses: pascalgn/npm-publish-action@1.3.3 + with: # Documentation of inputs https://github.com/marketplace/actions/publish-to-npm#inputs + tag_name: "v%s" + tag_message: "v%s" + commit_pattern: "^Release (\\S+)" + workspace: ".codedoc" + env: # Documentation of environment variables https://github.com/marketplace/actions/publish-to-npm#environment-variables + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # Must be set in repo settings \ No newline at end of file From ceda62ee9a43de028709b8866094d706cb54e4e4 Mon Sep 17 00:00:00 2001 From: Tyson Williams Date: Mon, 14 Sep 2020 07:22:21 -0500 Subject: [PATCH 2/3] set workspace to root directory --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 556ed44..95e5c61 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -21,7 +21,7 @@ jobs: tag_name: "v%s" tag_message: "v%s" commit_pattern: "^Release (\\S+)" - workspace: ".codedoc" + workspace: "." env: # Documentation of environment variables https://github.com/marketplace/actions/publish-to-npm#environment-variables GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # Must be set in repo settings \ No newline at end of file From 409cbba9f2f3f38f02c0b80eff17148bee6a7230 Mon Sep 17 00:00:00 2001 From: Tyson Williams Date: Mon, 14 Sep 2020 10:52:43 -0500 Subject: [PATCH 3/3] added step to build --- .github/workflows/npm-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 95e5c61..77504f7 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,6 +15,8 @@ jobs: uses: actions/setup-node@master with: node-version: 12.0.0 + - name: Build the package + run: npm run build - name: Publish if version has been updated uses: pascalgn/npm-publish-action@1.3.3 with: # Documentation of inputs https://github.com/marketplace/actions/publish-to-npm#inputs