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

28 lines
699 B
YAML
Raw 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 20:07:36 +00:00
branches: ["master"]
2024-04-17 20:06:43 +00:00
jobs:
publish:
runs-on: ubuntu-latest
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.12.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 }}
# Publish the package
2024-04-17 20:06:43 +00:00
- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.REPO_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.REPO_PASSWORD }}