Skip to content

[maven-release-plugin] prepare for next development iteration #71

[maven-release-plugin] prepare for next development iteration

[maven-release-plugin] prepare for next development iteration #71

Workflow file for this run

name: build
on:
push:
branches: [ master, dev ]
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: |
sudo apt-get -y install libxml2-utils rpm
- name: Graylog version
id: vinfo
run: |
export GRAYLOG_VERSION=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="parent"]/*[local-name()="version"]/text()' pom.xml)
echo "Building for Graylog ${GRAYLOG_VERSION}"
echo "GRAYLOG_VERSION=${GRAYLOG_VERSION}" >> $GITHUB_ENV
echo "::set-output name=GRAYLOG_VERSION::$GRAYLOG_VERSION"
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
- uses: actions/cache@v3
id: cache
with:
path: /home/runner/work/TelegramAlert/graylog2-server
key: ${{ runner.os }}-${{ steps.vinfo.outputs.date }}-${{ steps.vinfo.outputs.GRAYLOG_VERSION }}
- name: Initialize Graylog
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "Checking out Graylog ${{ env.GRAYLOG_VERSION }}"
git clone --depth 1 --branch "${{ env.GRAYLOG_VERSION }}" https://github.com/Graylog2/graylog2-server.git ../graylog2-server
pushd ../graylog2-server
./mvnw compile
popd
- name: Build
run: ../graylog2-server/mvnw -B package --file pom.xml
- name: Package deb
if: startsWith(github.ref, 'refs/tags/v')
run: ../graylog2-server/mvnw jdeb:jdeb
- name: Package rpm
if: startsWith(github.ref, 'refs/tags/v')
run: ../graylog2-server/mvnw rpm:rpm
- name: Cleanup
if: startsWith(github.ref, 'refs/tags/v')
run: rm -f target/original-*.jar
- name: Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
target/*.jar
target/*.deb
target/**/*.rpm
body: |
This release **requires Graylog X.X.X or later**
To update the plugin you need to remove the old `telegram-alert-x.x.x.jar` file from your plugins folder and follow the [installation instructions](https://github.com/irgendwr/TelegramAlert#installation) again.
## Changelog
- XXX
---
In case you like this plugin I would be happy if you could star ⭐️ this repository to keep me motivated πŸ˜„
If you want to support my work directly, you can also [sponsor me on GitHub](https://github.com/sponsors/irgendwr).
TelegramAlert currently has XXX ⭐ stars.
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}