Skip to content

Commit

Permalink
Add workflow step to create and push a new branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Dec 22, 2024
1 parent dc7501b commit 586bd06
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,21 @@ jobs:
- run: "npm publish"
env:
NODE_AUTH_TOKEN: "${{secrets.NPM_TOKEN}}"

create-branch:
needs: ["publish-npm"]
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0

- name: "Configure Git"
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: "Create and push branch"
run: |
git checkout -b ${{github.ref_name}}
git push origin ${{github.ref_name}}

0 comments on commit 586bd06

Please sign in to comment.