mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-16 08:32:34 +00:00
Add steps to update major version tag
This commit is contained in:
parent
eed2545295
commit
a0b152b5df
1 changed files with 11 additions and 2 deletions
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
|
@ -19,6 +19,13 @@ permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
major-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.major-version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- id: major-version
|
||||||
|
run: echo "version=$(echo "${{ inputs.versionNumber }}" | cut -d. -f1)" >> "$GITHUB_OUTPUT"
|
||||||
changelog-version:
|
changelog-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
|
@ -56,7 +63,7 @@ jobs:
|
||||||
git commit -a -m "Update changelog"
|
git commit -a -m "Update changelog"
|
||||||
git push
|
git push
|
||||||
release-tag:
|
release-tag:
|
||||||
needs: changelog
|
needs: [ changelog, major-version ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -69,7 +76,9 @@ jobs:
|
||||||
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
|
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
|
||||||
git pull
|
git pull
|
||||||
git tag "${{ inputs.versionNumber }}"
|
git tag "${{ inputs.versionNumber }}"
|
||||||
git push origin "${{ inputs.versionNumber }}
|
git tag -f "${{ needs.major-version.outputs.version }}"
|
||||||
|
git push origin "${{ inputs.versionNumber }}"
|
||||||
|
git push origin -f "${{ needs.major-version.outputs.version }}"
|
||||||
release:
|
release:
|
||||||
needs: [ changelog-version, changelog, release-tag ]
|
needs: [ changelog-version, changelog, release-tag ]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue