Skip to content

Commit

Permalink
Revert "Add version check to CLAW update [v8] (#2907)"
Browse files Browse the repository at this point in the history
This reverts commit 481c7e3.
  • Loading branch information
a-b committed May 23, 2024
1 parent 481c7e3 commit 0e96eff
Showing 1 changed file with 28 additions and 89 deletions.
117 changes: 28 additions & 89 deletions .github/workflows/release-build-sign-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,34 @@ jobs:
echo
echo "- ${VERSION_BUILD}"
github-release-draft:
name: Create GitHub Release Draft
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
needs:
- setup
- test-rpm-package
- test-deb-package
- test-macos
- test-windows
steps:
- name: Download signed artifacts
uses: actions/download-artifact@v4
with:
path: signed # download all artifacts to 'signed/'

- name: Create draft release
uses: pivotalsoftware/action-gh-release@v1
with:
draft: true
name: "DRAFT v${{ env.VERSION_BUILD }}"
# tag_name: "v${{ env.VERSION_BUILD }}"
repository: ${{ vars.GIT_RELEASE_TARGET_REPO }} # repo to draft a release under, in <user>/<repo> format
token: ${{ secrets.GIT_REPO_ACCESS_TOKEN }} # only needed when pushing to a repo other than 'self'
fail_on_unmatched_files: true

test-rpm-package:
name: Test RPM Artifacts
needs:
Expand Down Expand Up @@ -972,93 +1000,4 @@ jobs:
Get-AuthenticodeSignature -Verbose -ErrorAction Stop ".\winx64\cf${env:VERSION_MAJOR}_installer.exe"
Get-AuthenticodeSignature -Verbose -ErrorAction Stop ".\win32\cf${env:VERSION_MAJOR}_installer.exe"
github-release-draft:
name: Create GitHub Release Draft
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
needs:
- setup
- test-rpm-package
- test-deb-package
- test-macos
- test-windows
steps:
- name: Download signed artifacts
uses: actions/download-artifact@v4
with:
name: final-artifacts
path: artifacts # download all artifacts to 'artifacts/'

- name: Checkout CLI
uses: actions/checkout@v4

- name: Prepare release notes
run: |
sed -i 's/new-version/${{ needs.setup.outputs.version-build }}/g' .github/release/release-notes-template.txt
- name: Create draft release
uses: softprops/action-gh-release@v2
with:
draft: true
name: "DRAFT v${{ needs.setup.outputs.version-build }}"
tag_name: "v${{ needs.setup.outputs.version-build }}"
body_path: ".github/release/release-notes-template.txt"
fail_on_unmatched_files: true
generate_release_notes: true
files: |
artifacts/cf-cli-linux-rpm-packages/cf*rpm
artifacts/cf-cli-linux-deb-packages/cf*deb
artifacts/cf-cli-macos-packages/cf*pkg
artifacts/cf-cli-windows-packages/cf*zip
artifacts/linux_i686/*tgz
artifacts/linux_x86-64/*tgz
artifacts/linux_arm64/*tgz
artifacts/osx/*tgz
artifacts/macosarm/*tgz
artifacts/win32/*zip
artifacts/winx64/*zip
update-claw:
name: Add new release version to CLAW
runs-on: ubuntu-latest
needs:
- setup
- s3-upload
env:
VERSION_BUILD: ${{ needs.setup.outputs.version-build }}
steps:
- name: Checkout CLAW
uses: actions/checkout@v4
with:
repository: cloudfoundry/CLAW
ref: master
path: CLAW
ssh-key: ${{ secrets.GIT_SSH_KEY_CLAW }}

- name: Add new version to claw variables
run: |
set -ex
pushd CLAW
if grep --quiet "${VERSION_BUILD}" "claw-variables.yml" ; then
echo 'Version already exists in CLAW.'
exit 1
else
echo "- ${VERSION_BUILD}" >> claw-variables.yml
git add claw-variables.yml
if ! [ -z "$(git status --porcelain)"]; then
git config user.name github-actions
git config user.email github-actions@github.com
git commit -m "Add CF CLI ${VERSION_BUILD}"
else
echo "no new version to commit"
fi
git push
fi
popd
# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell:

0 comments on commit 0e96eff

Please sign in to comment.