From 11a07f8a024e33316b5f758d5fc615e55d727afb Mon Sep 17 00:00:00 2001 From: Aissaoui Ahmed Date: Thu, 16 Jul 2020 20:27:09 +0100 Subject: [PATCH] Update GitHub Actions Split npm-publish.yml -> pkg-npm.yml & pkg-github.yml Signed-off-by: Aissaoui Ahmed --- .github/workflows/npm-publish.yml | 45 ------------------------------- .github/workflows/pkg-github.yml | 19 +++++++++++++ .github/workflows/pkg-npm.yml | 19 +++++++++++++ package.json | 5 +++- 4 files changed, 42 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml create mode 100644 .github/workflows/pkg-github.yml create mode 100644 .github/workflows/pkg-npm.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 61b0d23..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,45 +0,0 @@ -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 - - 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/ - scope: '@aissaoui-ahmed' - - run: npm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@aissaoui-ahmed' - - run: npm config set '//npm.pkg.github.com/:_authToken' "${NODE_AUTH_TOKEN}" - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/pkg-github.yml b/.github/workflows/pkg-github.yml new file mode 100644 index 0000000..57251d7 --- /dev/null +++ b/.github/workflows/pkg-github.yml @@ -0,0 +1,19 @@ +name: Node.js Package on github registry. + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com + scope: '@aissaoui-ahmed' + - run: npm config set '//npm.pkg.github.com/:_authToken' "${NODE_AUTH_TOKEN}" && npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/pkg-npm.yml b/.github/workflows/pkg-npm.yml new file mode 100644 index 0000000..bb1216e --- /dev/null +++ b/.github/workflows/pkg-npm.yml @@ -0,0 +1,19 @@ +name: Node.js Package on npm registry. + +on: + release: + types: [created] + +jobs: + 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 + scope: '@aissaoui-ahmed' + - run: npm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" && npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/package.json b/package.json index 4f2e09e..d5b3cfe 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "@aissaoui-ahmed/accents", - "version": "1.0.2-alpha", + "version": "1.0.3-alpha", "description": "check and Remove accents!", "type": "module", + "bin": { + "accent": "./bin/accents.js" + }, "main": "index.js", "scripts": { "lint": "eslint ."