Skip to content

Fix syntax error in release workflow (#7200) #17

Fix syntax error in release workflow (#7200)

Fix syntax error in release workflow (#7200) #17

Workflow file for this run

# ------------------------------------------------------------
# Copyright 2023 The Radius Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------
name: assets
on:
push:
branches:
- main
tags:
- v*
jobs:
publish:
name: Assets
runs-on: ubuntu-latest
if: github.repository == 'radius-project/radius'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_release_version.py
# The install scripts are not versioned. They go to tools/rad/install.{sh,ps1}
- name: Upload install.sh
uses: bacongobbler/[email protected]
with:
source_dir: 'deploy'
container_name: 'tools'
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
overwrite: 'true'
extra_args: '--destination-path rad --pattern install.sh'
- name: Upload install.ps1
uses: bacongobbler/[email protected]
with:
source_dir: 'deploy'
container_name: 'tools'
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
overwrite: 'true'
extra_args: '--destination-path rad --pattern install.ps1'
- name: Upload Grafana dashboard
uses: bacongobbler/[email protected]
with:
source_dir: 'grafana'
container_name: 'tools'
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
overwrite: 'true'
extra_args: '--destination-path grafana --pattern *.json --timeout 300'
# Logic: If this is a real release (tagged, non-rc) then compare to our existing full
# release and see if it's newer. This prevents a patch release of an older vintage from overwriting
# a newer release
- name: Download version marker file
run: |
curl https://get.radapp.dev/version/stable.txt -o current-stable.txt
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
- name: Get version
id: setcurrentversion
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
run: echo "version=$(cat current-stable.txt)" >> $GITHUB_OUTPUT
- name: Compare versions
uses: madhead/semver-utils@latest
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
id: compare
with:
version: ${{ env.REL_CHANNEL }}.0
compare-to: ${{ steps.setcurrentversion.outputs.version }}.0
- name: Print info (for sanity)
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
run: |
echo "current stable channel: ${{ steps.setcurrentversion.outputs.version }}"
echo "this build channel: ${{ env.REL_CHANNEL }}"
echo "comparison: ${{ steps.compare.outputs.comparison-result }}"
- name: Write stable.txt
if: ${{ success() && steps.compare.outputs.comparison-result == '>' }}
run: |
echo $REL_CHANNEL > stable.txt
- name: 'Update latest version marker'
uses: bacongobbler/[email protected]
if: ${{ success() && steps.compare.outputs.comparison-result == '>' }}
with:
container_name: 'version'
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
overwrite: 'true'
source_dir: .
extra_args: '--pattern stable.txt'