Skip to content

v1.0.0

v1.0.0 #1

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 tile
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
curl -sSLo /tmp/tile https://github.com/cf-platform-eng/tile-generator/releases/latest/download/tile_linux-64bit
chmod +x /tmp/tile && sudo mv /tmp/tile /usr/local/bin/tile
- 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)
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
chmod +x falcon-installer && rm -f falcon-installer-linux-x86_64.tar.gz
cp -p falcon-installer final_blobs/falcon-installer
bosh add-blob final_blobs/falcon-installer falcon-installer
rm final_blobs/falcon-installer
- 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=resources/falcon-boshrelease.tgz --version ${VERSION}
- name: Create pivotal tile
run: |
sed "s/^[ ]\+version: .*/ version: $VERSION/g" -i tile.yml
tile build ${VERSION}
- 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.yml tile-history.yml
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 resources/falcon-boshrelease.tgz product/*.pivotal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}