Skip to content

Commit

Permalink
Merge pull request #6 from eyea/main
Browse files Browse the repository at this point in the history
feat: 优化发布脚本
  • Loading branch information
eyea authored Nov 11, 2023
2 parents be92aa4 + ae45d0b commit edbf159
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Node.js Package
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Node.js Package From Github Repo

on:
release:
types: [created]
push:
branches:
- main
Expand All @@ -9,30 +14,23 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
# - run: npm test

publish-gpr:
publish-npm:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
scope: '@afuteam'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm set '//registry.npmjs.org/:_authToken' $NODE_AUTH_TOKEN
- run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.AFUTEAM_LINT_PUBLISH_NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.AFUTEAM_LINT_PUBLISH_NPM_TOKEN}}
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@afuteam/eslint-plugin-fe",
"version": "0.0.2",
"version": "0.0.4",
"description": "AfuTeam ESLint Rules",
"main": "./lib/index.js",
"exports": "./lib/index.js",
Expand All @@ -17,14 +17,13 @@
"url": "git+ssh://[email protected]/afu-fe/afu-eslint-rule.git"
},
"keywords": [
"afu",
"AfuTeam",
"eslint",
"eslintconfig",
"javascript",
"vue",
"react",
"typescript"
"ESLint",
"ESlintConfig",
"JavasSript",
"Vue2",
"React",
"TypesSript"
],
"author": "eyea <[email protected]>",
"license": "ISC",
Expand Down

0 comments on commit edbf159

Please sign in to comment.