Skip to content

Release Graylog Plugin #1

Release Graylog Plugin

Release Graylog Plugin #1

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