Skip to content

Commit 6dcf73a

Browse files
authored
Create release.yml
1 parent c703935 commit 6dcf73a

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Release version'
7+
required: true
8+
targetBranch:
9+
description: 'TargetBranch to tag (e.g. release/4.x)'
10+
required: true
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Branch
16+
uses: actions/checkout@v2
17+
with:
18+
ref: dev
19+
fetch-depth: 0
20+
token: ${{ secrets.PIPELINE_ADMIN }}
21+
- name: Create Release Tag
22+
id: createBranch
23+
run: |
24+
set -e
25+
git config --local user.email "[email protected]"
26+
git config --local user.name "Azure Logic Apps"
27+
git fetch --all
28+
git checkout -b ${{ github.event.inputs.targetBranch }} origin/${{ github.event.inputs.targetBranch }}
29+
git merge dev
30+
git tag ${{ github.event.inputs.version }}
31+
git push
32+
git push origin ${{ github.event.inputs.version }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.PIPELINE_ADMIN }}
35+
- name: Release Drafter
36+
id: release
37+
uses: release-drafter/[email protected]
38+
with:
39+
tag: ${{ github.event.inputs.version }}
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name : Generate v4 Assets
43+
if : startsWith(github.event.inputs.version, '4')
44+
run: |
45+
./host/generate-composite.sh -r all
46+
zip -r ${{ github.event.inputs.version }}.zip ./host/bullseye/amd64/release/
47+
- name: Attach Assets to Release
48+
uses: actions/upload-release-asset@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
upload_url: ${{ steps.release.outputs.upload_url }}
53+
asset_path: ./${{ github.event.inputs.version }}.zip
54+
asset_name: ${{ github.event.inputs.version }}-appservice.zip
55+
asset_content_type: application/zip

0 commit comments

Comments
 (0)