From 41e23bf23ce8cb6559a3a99c4a4c49ed73b97e78 Mon Sep 17 00:00:00 2001 From: adasq Date: Sun, 26 Apr 2020 14:40:50 +0200 Subject: [PATCH 1/2] Create npmpublish.yml --- .github/workflows/npmpublish.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 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..6b65a48 --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +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: 13 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 13 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From c1d48936ab69930e5163f9b6affb45670bd4cdf5 Mon Sep 17 00:00:00 2001 From: adasq Date: Sun, 26 Apr 2020 14:41:54 +0200 Subject: [PATCH 2/2] Update npmpublish.yml --- .github/workflows/npmpublish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 6b65a48..8dfa4da 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -17,6 +17,10 @@ jobs: node-version: 13 - run: npm ci - run: npm test + env: + VIDEO_ID: ${{ secrets.VIDEO_ID }} + LESS_THAN_10MIN_VIDEO_ID: ${{ secrets.LESS_THAN_10MIN_VIDEO_ID }} + GOOGLE_COOKIE: ${{ secrets.GOOGLE_COOKIE }} publish-npm: needs: build