Skip to content

Commit

Permalink
ci: test npm publish workflow
Browse files Browse the repository at this point in the history
ci: test npm publish workflow

ci: test npm publish workflow

ci: remove incorrect matrix

ci: npm publish wotkflow use admin token

ci: npm publish wotkflow use admin token

ci: use create pr instead of push to avoid protected rule
  • Loading branch information
noahziheng committed May 12, 2022
1 parent 9c746c7 commit 9dc32ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- published

jobs:
build:

publish:
name: Publish to NPM & Create Pull Request of Version Update
# Run on latest version of ubuntu
runs-on: ubuntu-latest

Expand All @@ -31,6 +31,7 @@ jobs:
- run: git config --global user.name "Artus Version Bot"
- run: git config --global user.email "[email protected]"
# upgrade npm version in package.json to the tag used in the release.
# upgrade npm version in package.json to the tag used in the release.
- run: npm version ${{ github.event.release.tag_name }}
# build the project
- run: npm run build
Expand All @@ -46,8 +47,7 @@ jobs:
if: "github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# push the version changes to GitHub
- run: git push
env:
# The secret is passed automatically. Nothing to configure.
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "[Version] ${{ github.event.release.tag_name }}"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
},
"ci": {
"type": "github",
"version": "12, 14, 16"
"version": "16"
}
}

0 comments on commit 9dc32ab

Please sign in to comment.