Skip to content

v1.4.0

v1.4.0 #6

Workflow file for this run

name: Release
on:
release:
types:
- created
# Releases need permissions to read and write the repository contents.
# GitHub considers creating releases and uploading assets as writing contents.
permissions:
contents: write
env:
TAG: ${{ github.event.release.tag_name }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Install bosh-cli and kiln
run: |
BOSHREL=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/cloudfoundry/bosh-cli/releases/latest) | sed s/v//g)
curl -sSLo /tmp/bosh https://github.com/cloudfoundry/bosh-cli/releases/latest/download/bosh-cli-${BOSHREL}-linux-amd64
chmod +x /tmp/bosh && sudo mv /tmp/bosh /usr/local/bin/bosh
KILNREL=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/pivotal-cf/kiln/releases/latest) | sed s/v//g)
curl -sSLo /tmp/kiln https://github.com/pivotal-cf/kiln/releases/latest/download/kiln-linux-amd64-${KILNREL}
chmod +x /tmp/kiln && sudo mv /tmp/kiln /usr/local/bin/kiln
- name: Download falcon-installer
run: |
REL=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/CrowdStrike/falcon-installer/releases/latest) | sed s/v//g)
# Add Linux installer
curl -sSLo falcon-installer-linux-x86_64.tar.gz https://github.com/CrowdStrike/falcon-installer/releases/latest/download/falcon-installer-${REL}-linux-x86_64.tar.gz
tar -xzf falcon-installer-linux-x86_64.tar.gz -C final_blobs/
chmod +x final_blobs/falcon-installer && rm -f falcon-installer-linux-x86_64.tar.gz
bosh add-blob final_blobs/falcon-installer falcon-installer
# Add Windows installer
curl -sSLo falcon-installer-windows-x86_64.zip https://github.com/CrowdStrike/falcon-installer/releases/latest/download/falcon-installer-${REL}-windows-x86_64.zip
unzip -o falcon-installer-windows-x86_64.zip -d final_blobs/
chmod +x final_blobs/falcon-installer.exe && rm -f falcon-installer-windows-x86_64.zip
bosh add-blob final_blobs/falcon-installer.exe falcon-installer.exe
rm final_blobs/{falcon-installer,falcon-installer.exe,README.md,LICENSE}
- name: Set Release Version
run: |
echo "VERSION=$(echo $TAG | sed s/v//g)" >> $GITHUB_ENV
- name: Create bosh release
run: |
bosh create-release --force --final --tarball=tile/releases/falcon-boshrelease.tgz --version ${VERSION}
- name: Create pivotal tile
run: |
sed "s/[0-9][0-9.]*/$VERSION/g" -i tile/version
cd tile && kiln bake --skip-fetch --final -o crowdstrike-falcon-cf-${VERSION}.pivotal
- name: Update release artifacts in GitHub
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add final_blobs config releases tile
git commit -m "Updating release components for ${TAG}"
git push origin HEAD:${{ github.event.release.target_commitish }}
git tag -f "${GITHUB_REF#refs/tags/}"
git push origin "${GITHUB_REF#refs/tags/}" --force
- name: Update artifacts to release
run: |
gh release upload $TAG tile/releases/falcon-boshrelease.tgz tile/*.pivotal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}