Add job to update package version

This commit is contained in:
SBGoods 2023-02-09 16:41:42 -05:00
parent a0b152b5df
commit 8972b88921

View file

@ -62,8 +62,30 @@ jobs:
git add .
git commit -a -m "Update changelog"
git push
update-package-version:
needs: changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Update package version
run: npm version "${{ inputs.versionNumber }}" --git-tag-version false
- name: Git push
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
git pull
git add .
git commit -a -m "Update package version"
git push
release-tag:
needs: [ changelog, major-version ]
needs: [ update-package-version, major-version ]
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -80,7 +102,7 @@ jobs:
git push origin "${{ inputs.versionNumber }}"
git push origin -f "${{ needs.major-version.outputs.version }}"
release:
needs: [ changelog-version, changelog, release-tag ]
needs: [ changelog-version, release-tag ]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0