Skip to content

v0.22.30

v0.22.30 #139

Workflow file for this run

name: Build release artifacts
on:
release:
types:
- published
jobs:
call-cmake-build:
uses: ./.github/workflows/cmake.yml
release:
name: Download Release Artifacts
runs-on: ubuntu-latest
needs: [ call-cmake-build ]
outputs:
ZITI_VERSION: ${{ steps.get_version.outputs.ZITI_VERSION }}
steps:
- name: Debug action
uses: hmarr/debug-action@v2.1.0
- name: download
uses: actions/download-artifact@v3
with:
path: ${{ runner.workspace }}/downloads/
- name: List Release Artifacts
run: ls -horRAS ${{runner.workspace}}/downloads/
# the purpose of this step is to identify the release that was created for the current tag and upload the
# artifacts that do not need to be renamed
- name: Release
id: get_release
uses: softprops/action-gh-release@v1
with:
# name: defaults to tag name
# tag_name: defaults to github.ref
# token: defaults to github.token
fail_on_unmatched_files: true
files: |
${{ runner.workspace }}/downloads/linux-x64/ziti-edge-tunnel-Linux_x86_64.zip
${{ runner.workspace }}/downloads/linux-arm/ziti-edge-tunnel-Linux_arm.zip
${{ runner.workspace }}/downloads/macOS-x64/ziti-edge-tunnel-Darwin_x86_64.zip
${{ runner.workspace }}/downloads/macOS-arm64/ziti-edge-tunnel-Darwin_arm64.zip
# These final two steps are only necessary because we prefer a different
# release artifact name than is created by CMake, and so we could change
# the CMake configuration or add an inline (shell) run step to manipulate
# the filenames. The pre-release build doesn't rename the artifacts.
- name: upload Linux ARM64 with different name
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ runner.workspace }}/downloads/linux-arm64/ziti-edge-tunnel-Linux_aarch64.zip
asset_name: ziti-edge-tunnel-Linux_arm64.zip
asset_content_type: application/octet-stream
- name: upload Windows with different name
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ runner.workspace }}/downloads/windows-x64-mingw/ziti-edge-tunnel-Windows_AMD64.zip
asset_name: ziti-edge-tunnel-Windows_x86_64.zip
asset_content_type: application/octet-stream
- name: Get the Version String from Git Tag
id: get_version
env:
GITHUB_REF: ${{ github.ref }}
run: |
ZITI_VERSION="${GITHUB_REF#refs/*/v}"
if [[ "${ZITI_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "DEBUG: ZITI_VERSION=${ZITI_VERSION}"
echo ZITI_VERSION="${ZITI_VERSION}" >> $GITHUB_OUTPUT
else
# fail the job because we could not obtain a valid version string from the Git ref
echo "ERROR: ZITI_VERSION=${ZITI_VERSION} is not a semver"
exit 1
fi
call-publish-containers:
name: Publish Container Images
needs: [ release ]
uses: ./.github/workflows/publish-containers.yml
secrets: inherit
with:
ziti-version: ${{ needs.release.outputs.ZITI_VERSION }}