mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-16 16:42:35 +00:00
Add job to update package version
This commit is contained in:
parent
a0b152b5df
commit
8972b88921
1 changed files with 24 additions and 2 deletions
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
|
@ -62,8 +62,30 @@ jobs:
|
||||||
git add .
|
git add .
|
||||||
git commit -a -m "Update changelog"
|
git commit -a -m "Update changelog"
|
||||||
git push
|
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:
|
release-tag:
|
||||||
needs: [ changelog, major-version ]
|
needs: [ update-package-version, major-version ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -80,7 +102,7 @@ jobs:
|
||||||
git push origin "${{ inputs.versionNumber }}"
|
git push origin "${{ inputs.versionNumber }}"
|
||||||
git push origin -f "${{ needs.major-version.outputs.version }}"
|
git push origin -f "${{ needs.major-version.outputs.version }}"
|
||||||
release:
|
release:
|
||||||
needs: [ changelog-version, changelog, release-tag ]
|
needs: [ changelog-version, release-tag ]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue