From f31c8795cdb1ede39734fe7013a0c6f6f7698546 Mon Sep 17 00:00:00 2001 From: Onildo Aguiar Date: Sun, 15 Dec 2019 01:11:43 -0500 Subject: [PATCH] feat: update github actions (#26) --- .github/workflows/githubpackagespublish.yml | 31 +++++++++++++++++++++ .github/workflows/npmpublish.yml | 19 ++----------- 2 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/githubpackagespublish.yml diff --git a/.github/workflows/githubpackagespublish.yml b/.github/workflows/githubpackagespublish.yml new file mode 100644 index 0000000..2fa4c46 --- /dev/null +++ b/.github/workflows/githubpackagespublish.yml @@ -0,0 +1,31 @@ +name: GitHub Packages + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + publish-github-packages: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + scope: '@onildoaguiar' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.github_packages_token}} diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index be8f7ef..e6894d6 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -1,4 +1,4 @@ -name: Node.js Package +name: NPM Package on: release: @@ -27,19 +27,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@your-github-username' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.github_packages_token}} + NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file