Skip to content

GitHub Release

GitHub Release #10

Workflow file for this run

#
# Copyright (C) 2020-2024 Arm Limited or its affiliates and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
name: GitHub Release
env:
python_version: "3.9"
on:
workflow_dispatch:
inputs:
release_type:
description:
"Enter type of release to perform (i.e. development, beta, release):"
required: true
type: string
jobs:
check-for-changes:
name: Check for changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.check.outputs.changes }}
steps:
- uses: actions/checkout@v4
- name: Check if changes directory contains files
id: check
run: |
CHANGES=$(git show $(git remote show origin | awk '/HEAD branch/ {print $NF}'):changes/ 2>/dev/null | grep -e .feature -e .bugfix -e .major -e .doc -e .misc)
echo "changes=1" >> $GITHUB_OUTPUT
continue-on-error: true # in case '2>/dev/null' doesn't work
release:
name: Carry out a release
runs-on: ubuntu-latest
needs:
- check-for-changes
if: needs.check-for-changes.outputs.changes
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install CI/CD tools
run: pip install continuous-delivery-scripts>=2.7 && pip list
- name: Tag and release
run: cd-tag-and-release -b ${CI_ACTION_REF_NAME} -t ${{ github.event.inputs.release_type }} -vv
env:
GIT_TOKEN: ${{ secrets.GIT_SECRET }}