Skip to content

Commit

Permalink
chore: update npmrc & workflow action
Browse files Browse the repository at this point in the history
  • Loading branch information
TbhT committed Jul 3, 2024
1 parent 39eb2eb commit 3c749e3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/onPushToMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -28,12 +29,14 @@ jobs:
echo "tag=v$package_version" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup git
if: ${{ steps.version-check.outputs.skipped == 'false' }}
run: |
git config --global user.email ${{ secrets.GH_EMAIL }}
git config --global user.name ${{ secrets.GH_USERNAME }}
- name: Setup pnpm
run: npm install pnpm -g
- name: Generate oclif README
if: ${{ steps.version-check.outputs.skipped == 'false' }}
id: oclif-readme
Expand All @@ -52,5 +55,5 @@ jobs:
name: ${{ steps.version-check.outputs.tag }}
tag: ${{ steps.version-check.outputs.tag }}
commit: ${{ github.ref_name }}
token: ${{ secrets.GH_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
skipIfReleaseExists: true
9 changes: 8 additions & 1 deletion .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Setup pnpm
run: npm install pnpm -g

- run: pnpm install
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c
with:
token: ${{ secrets.NPM_TOKEN }}
token: ${{ secrets.PAT }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmmirror.com/
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@
}
}
},
"repository": "TbhT/thrift-code-gen",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/TbhT/open-lark-ts.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"build": "shx rm -rf dist && copyfiles -u 1 src/**/*.ejs dist && tsc -b && tsc-alias",
"lint": "eslint . --ext .ts",
Expand Down

0 comments on commit 3c749e3

Please sign in to comment.