first
This commit is contained in:
28
.github/workflows/maven-publish.yml
vendored
Normal file
28
.github/workflows/maven-publish.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Maven Central Repo Deployment
|
||||
on:
|
||||
release:
|
||||
types: [released, prereleased]
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Git Repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Maven Central Repo
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
server-id: ossrh
|
||||
server-username: 'OSSRH_USER'
|
||||
server-password: 'OSSRH_PASSWORD'
|
||||
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
|
||||
gpg-private-key: ${{ secrets.GPG_SECRET }}
|
||||
- name: debug settings.xml
|
||||
run: cat /home/runner/.m2/settings.xml
|
||||
- name: Publish to Maven Central Repo
|
||||
run: mvn clean deploy --batch-mode --activate-profiles deploy
|
||||
env:
|
||||
OSSRH_USER: ${{ secrets.OSSRH_TOKEN_USER }}
|
||||
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
|
||||
42
.github/workflows/reduce-adoc.yml
vendored
Normal file
42
.github/workflows/reduce-adoc.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Reduce Adoc
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**/*-source.adoc'
|
||||
branches: ['**']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
reduce:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.2'
|
||||
|
||||
- name: Install asciidoctor-reducer
|
||||
run: gem install --no-document asciidoctor-reducer
|
||||
|
||||
- name: Reduce all *-source.adoc files
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -d '' -t sources < <(find . -type f -name '*-source.adoc' -print0)
|
||||
for src in "${sources[@]}"; do
|
||||
out="${src%-source.adoc}.adoc"
|
||||
mkdir -p "$(dirname "$out")"
|
||||
echo "Reducing $src -> $out"
|
||||
asciidoctor-reducer --preserve-conditionals -o "$out" "$src"
|
||||
done
|
||||
|
||||
- name: Commit reduced files
|
||||
uses: EndBug/add-and-commit@v9
|
||||
20
.github/workflows/unittest.yml
vendored
Normal file
20
.github/workflows/unittest.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Java Unit Test with Maven
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
- name: Run tests with Maven
|
||||
run: mvn -B clean test --file pom.xml
|
||||
- name: Upload results to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
Reference in New Issue
Block a user