From f8a2f3a87e719978ddb42deeb286226d2c6b3177 Mon Sep 17 00:00:00 2001 From: "Dido (Christoph Poelt)" Date: Tue, 25 Feb 2020 10:04:27 +0100 Subject: [PATCH 1/2] add github action for publishing --- .github/workflows/npmpublish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/npmpublish.yml diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 0000000..2d27ab4 --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,30 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm run lint + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From 93670559296351b8be7cba3a4031b57bb22211c3 Mon Sep 17 00:00:00 2001 From: "Dido (Christoph Poelt)" Date: Tue, 25 Feb 2020 10:13:03 +0100 Subject: [PATCH 2/2] change npm token env var name --- .github/workflows/npmpublish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 2d27ab4..d9945da 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -27,4 +27,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}