diff --git a/.github/workflows/package-version.yml b/.github/workflows/package-version.yml index 38c6364..e6ef94b 100644 --- a/.github/workflows/package-version.yml +++ b/.github/workflows/package-version.yml @@ -7,25 +7,43 @@ on: jobs: minor: runs-on: ubuntu-latest - if: ${{ github.event.label.name == "release minor" }} + if: ${{ github.event.label.name == 'release minor' }} steps: - name: check out repository code uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: git config + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - name: increment minor version run: | npm version minor - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "release: automated change" + - name: git push + run: | + git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} + git push origin HEAD:${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} patch: runs-on: ubuntu-latest - if: ${{ github.event.label.name == "release patch" }} + if: ${{ github.event.label.name == 'release patch' }} steps: - name: check out repository code uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: git config + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - name: increment patch version run: | npm version patch - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "release: automated change" + - name: git push + run: | + git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} + git push origin HEAD:${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}