-
Notifications
You must be signed in to change notification settings - Fork 583
71 lines (68 loc) · 2.83 KB
/
github-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Github Release
on:
workflow_dispatch:
inputs:
build-zoo-handler:
description: 'Build Zoo Handler Payload'
required: true
jobs:
ghrelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.8.8
maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/'
# zoo extract and ensure
- name: Extract Zoo Context Properties
uses: jvalkeal/[email protected]
with:
dispatch-handler-extract-context-properties: true
ensure-env: |
BUILD_ZOO_HANDLER_spring_cloud_deployer_version
BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version
BUILD_ZOO_HANDLER_spring_cloud_dataflow_version
# tooling
- name: Install Tooling
run: |
curl -sSL https://github.com/cbroglie/mustache/releases/download/v1.4.0/mustache_1.4.0_linux_amd64.tar.gz | sudo tar -C /usr/local/bin/ --no-same-owner -xzv mustache
# release notes and gh release
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
# generate release notes
.github/workflows/generate-release-notes.sh "${{ runner.temp }}" "$BUILD_ZOO_HANDLER_spring_cloud_deployer_version" "$BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version" "$BUILD_ZOO_HANDLER_spring_cloud_dataflow_version"
gh release create v$BUILD_ZOO_HANDLER_spring_cloud_dataflow_version \
--draft \
--title "Spring Cloud Data Flow $BUILD_ZOO_HANDLER_spring_cloud_dataflow_version" \
--notes-file "${{runner.temp}}/release_notes.md"
# retrieve spring-cloud-dataflow-package and upload to github release
export PACKAGE_VERSION=${$BUILD_ZOO_HANDLER_spring_cloud_dataflow_version}
pushd spring-cloud-dataflow-package
./set-package-version.sh
../mvnw package
popd
PACKAGE_FILE="./spring-cloud-dataflow-package/target/spring-cloud-dataflow-oss-install-${PACKAGE_VERSION}.zip"
gh release upload v$PACKAGE_VERSION $PACKAGE_FILE --clobber
# zoo success
- name: Notify Build Success Zoo Handler Controller
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "ghrelease-succeed"
}
# zoo failure
- name: Notify Build Failure Zoo Handler Controller
if: ${{ failure() }}
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.REPO_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "ghrelease-failed"
}