Java-Library/.gitea/workflows/publish.yml

46 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-04-17 20:07:36 +00:00
name: Publish package to my Maven Repository
2024-04-17 20:06:43 +00:00
on:
push:
2024-04-17 21:07:47 +00:00
branches: [master]
paths-ignore:
- .gitignore
- README.md
- LICENSE
2024-04-17 20:07:36 +00:00
2024-04-17 20:06:43 +00:00
jobs:
2024-04-17 20:09:19 +00:00
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
git-version: ["2.44.0"]
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: ${{ matrix.arch }}
2024-04-17 20:06:43 +00:00
steps:
2024-04-17 20:08:28 +00:00
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.14.0
2024-04-17 20:06:43 +00:00
with:
2024-04-17 20:08:28 +00:00
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
2024-04-17 20:17:56 +00:00
# Setup Maven settings
- name: Setup Maven settings
uses: s4u/maven-settings-action@v3.0.0
with:
servers: |
[{
"id": "mcutils-java-library",
"username": "${{ secrets.REPO_USERNAME }}",
"password": "${{ secrets.REPO_PASSWORD }}"
}]
2024-04-17 20:08:28 +00:00
# Publish the package
2024-04-17 20:06:43 +00:00
- name: Publish package
2024-04-17 20:52:45 +00:00
run: mvn deploy -Pgen-javadocs -B -Dstyle.color=always --update-snapshots -e