Skip to content

Commit

Permalink
ci(Github action): Release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SidMorad committed Nov 5, 2023
1 parent 85f802c commit d726932
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish package to the Maven Central Repository
name: Publish to the Maven Central Repository
on:
release:
types: [created]
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/maven-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- release

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 14
server-id: github
- name: Configure Git user
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
- name: Publish JAR
run: ./mvnw -B release:prepare release:perform
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
<quarkus.platform.version>3.5.0</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
<project.scm.id>github</project.scm.id>
</properties>
<scm>
<developerConnection>scm:git:https://github.com/taakcloud/taak-sdk-java.git</developerConnection>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand Down

0 comments on commit d726932

Please sign in to comment.