Skip to content

Commit

Permalink
Use actions-js/push
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Jun 2, 2023
1 parent a489c38 commit 41c8970
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
Expand All @@ -23,17 +20,13 @@ jobs:
- run: npm ci
- name: Increment version
run: npm run increment-version
- name: Push new version
run: |
echo ${{ github.actor }}
echo ${{ github.repository }}
REPO=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git config http.sslVerify false
git config --global user.email "otiai10+ayanel-ci@gmail.com"
git config --global user.name "Ayanel CI"
git add package.json package-lock.json
git commit -m "Bump version"
git push ${REPO} HEAD:main --follow-tags
- name: Commit and Push Changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
author_name: Ayanel CI
author_email: otiai10+ayanel-ci@gmail.com
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 41c8970

Please sign in to comment.