Skip to content

Release

Release #121

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
targetBranch:
description: 'TargetBranch to tag (e.g. release/3.x)'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v2
with:
ref: dev
fetch-depth: 0
token: ${{ secrets.PIPELINE_ADMIN }}
- name: Create Release Tag
id: createBranch
run: |
set -e
git config --local user.email "[email protected]"
git config --local user.name "Azure Functions"
git fetch --all
git checkout -b ${{ github.event.inputs.targetBranch }} origin/${{ github.event.inputs.targetBranch }}
git merge dev
git tag ${{ github.event.inputs.version }}
git push
git push origin ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.PIPELINE_ADMIN }}
- name: Release Drafter
id: release
uses: release-drafter/[email protected]
with:
tag: ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name : Generate v3 Assets
if : startsWith(github.event.inputs.version, '3')
run: |
./host/generate-composite.sh -3 -r all
zip -r ${{ github.event.inputs.version }}.zip ./host/3.0/buster/amd64/release/
- name : Generate v4 Assets
if : startsWith(github.event.inputs.version, '4')
run: |
./host/generate-composite.sh -4 -r all
zip -r ${{ github.event.inputs.version }}.zip ./host/4/bullseye/amd64/release/
- name: Attach Assets to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./${{ github.event.inputs.version }}.zip
asset_name: ${{ github.event.inputs.version }}-appservice.zip
asset_content_type: application/zip