-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (50 loc) · 1.92 KB
/
release-graylog-plugin.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
name: Release Graylog Plugin
on:
workflow_dispatch:
inputs:
release-version:
description: 'Version of Release'
required: true
jobs:
maven:
name: Graylog Plugin Release
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'temurin'
- name: Create Build Output Directory
run: mkdir -p ./mvn-build/graylog-plugin
- name: Copy Integration Files
run: cp -R graylog-plugin/. ./mvn-build/graylog-plugin
- name: Build project with Maven
run: |
cd ./mvn-build/graylog-plugin && \
mvn -B package -Dversion=${{ github.event.inputs.release-version }} --file pom.xml
- name: Compressing mvn Package
run: |
cd ./mvn-build/graylog-plugin/target
zip -r jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip ./jsm-graylog-plugin-${{ github.event.inputs.release-version }}.jar
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
tag_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}
release_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./mvn-build/graylog-plugin/target/jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip
asset_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip
asset_content_type: application/zip