Create config.yml #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven Package | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Get version | |
run: git describe --tags && echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV | |
- name: Build | |
run: docker build . --tag builder | |
- name: Run | |
run: docker run -v ${{ github.workspace }}:/code:Z builder | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn -s ${{ github.workspace}}/settings.xml -f rpm.pom.xml -B -Drevision=${{ env.RELEASE_VERSION }} -Dsha1= -Dchangelist= deploy | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
- name: Attach rpm as artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: target/rpm/com.teragrep-blf_02/RPMS/x86_64/com.teragrep-blf_02-*.rpm |