Skip to content

add maven publishing #13

add maven publishing

add maven publishing #13

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'
jobs:
build-jvm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle build
run: ./gradlew build
- name: Upload app-jar
uses: actions/upload-artifact@v4
with:
name: app-jar
path: |
build/libs/m3u8-parser*.jar
retention-days: 7
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle jacocoReport
shell: bash
run: |
./gradlew --version
./gradlew --scan --no-parallel --stacktrace --warning-mode=all jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [build-jvm]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
outputFile: changelog.txt
configuration: ".github/release-changelog-builder.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: changelog.txt
draft: truerelease-changelog-builder.json
app-jar/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Gradle publish
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository