From 6b2152abc4cafe0f6cb54570a12acf00ac0b5f92 Mon Sep 17 00:00:00 2001 From: Houssene Dao Date: Thu, 16 Dec 2021 14:26:04 +0000 Subject: [PATCH] fix(): change action process --- .github/workflows/publisher.yml | 38 ++++++++++++--------------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publisher.yml b/.github/workflows/publisher.yml index 5a8bcdc..9cc8b3c 100644 --- a/.github/workflows/publisher.yml +++ b/.github/workflows/publisher.yml @@ -5,32 +5,22 @@ on: types: [created] jobs: - build: + npm-publish: + name: npm-publish runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - - name: Checkout source code + - name: Checkout repository uses: actions/checkout@v2 - - - name: Use NodeJS v12 - uses: actions/setup-node@v2 + - name: Publish if version has been updated + uses: pascalgn/npm-publish-action@1.3.8 with: - node-version: '12.x' - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm install - - - name: Build project - run: npm run build - - - name: Build index.ts file - run: tsc index.ts -d - - - name: Publish package - run: npm publish + tag_name: "v%s" + tag_message: "v%s" + create_tag: "true" + commit_pattern: "^Release (\\S+)" + workspace: "." + publish_command: "npm" + publish_args: "--non-interactive" env: - NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} \ No newline at end of file