forked from apache/incubator-livy
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.71 KB
/
publish-maven-package.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
name: Publish Maven Package
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
type: string
release_name:
description: 'Release name'
required: true
type: string
is_draft:
description: 'Create a draft release'
required: false
default: 'false'
type: boolean
is_prerelease:
description: 'Create a pre-release'
required: false
default: 'false'
type: boolean
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn clean package -B -V -e -Pspark3 -Pscala-2.12 -Phadoop3 -DskipTests -T1C
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.release_name }}
draft: ${{ github.event.inputs.is_draft }}
prerelease: ${{ github.event.inputs.is_prerelease }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assembly/target/apache-livy-0.9.0-incubating-SNAPSHOT_2.12-bin.zip
asset_name: livy-0.9-snapshot.zip
asset_content_type: application/zip