Skip to content

Commit

Permalink
fix(): change action process
Browse files Browse the repository at this point in the history
  • Loading branch information
houssenedao committed Dec 16, 2021
1 parent a933486 commit 6b2152a
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}

0 comments on commit 6b2152a

Please sign in to comment.