diff --git a/.github/workflows/npmp.yml b/.github/workflows/npmp.yml new file mode 100644 index 0000000..ca0edfd --- /dev/null +++ b/.github/workflows/npmp.yml @@ -0,0 +1,25 @@ +name: "Publishing to NPM" + +on: + push: + branches: + - main + paths: + - "lib/**" + - "main.js" + pull_request: + branches: + - main + paths: + - "lib/**" + - "main.js" + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 33ed61a..bd03c51 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ [Github仓库链接](https://github.com/shanmiteko/LotteryAutoScript) [![Package Node.js project into an executable](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/pkg.yml/badge.svg)](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/pkg.yml)
-[![Build and push Docker images](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/docker.yml/badge.svg)](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/docker.yml) +[![Build and push Docker images](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/docker.yml/badge.svg)](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/docker.yml)
+[![Publishing to NPM](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/npmp.yml/badge.svg)](https://github.com/shanmiteko/LotteryAutoScript/actions/workflows/npmp.yml) 已实现功能: - 监控用户转发