-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (40 loc) · 1.64 KB
/
build.yaml
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
#
# Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved.
#
# 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
#
name: build
on: [push, pull_request, workflow_dispatch]
# workflow_dispatch should make manually triggered ci/cd possible
# workflow file (like this) with `workflow_dispatch` after on should exist on the **master** or default branch,
# or there will be no ui for a manual trigger. https://github.community/t/workflow-dispatch-event-not-working/128856/2
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11' # major or semver Java version will be acceptable, see https://github.com/marketplace/actions/setup-java-jdk#basic
- name: Build
run: ./scripts/build-installer.sh
- name: Set env
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./pravega-sensor-collector/build/distributions/pravega-sensor-collector-*.tgz
draft: true
name: pravega-sensor-collector ${{ env.RELEASE_VERSION }}