Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Switch to publishing on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Konicai committed Sep 21, 2023
1 parent eae1397 commit 4f5b210
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 33 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

- name: Set up JDK 1.8
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: 8
distribution: temurin

- uses: s4u/[email protected]
with:
servers: '[{"id": "opencollab-release-repo", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}"},{"id": "opencollab-snapshot-repo", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}"}]'

- name: Deploy with Maven
run: mvn deploy -B -P deploy
env:
MAVEN_USERNAME: ${{ vars.DEPLOY_USER }}
MAVEN_PASSWORD: ${{ secrets.DEPLOY_PASS }}
13 changes: 10 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: 1.8
java-version: 8
distribution: temurin

- name: Build with Maven
run: mvn package --file pom.xml
30 changes: 0 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,5 @@ pipeline {
}
}
}

stage ('Deploy') {
when {
branch "master"
}

steps {
rtMavenDeployer(
id: "maven-deployer",
serverId: "opencollab-artifactory",
releaseRepo: "maven-releases",
snapshotRepo: "maven-snapshots"
)
rtMavenResolver(
id: "maven-resolver",
serverId: "opencollab-artifactory",
releaseRepo: "maven-deploy-release",
snapshotRepo: "maven-deploy-snapshot"
)
rtMavenRun(
pom: 'pom.xml',
goals: 'javadoc:jar source:jar install -DskipTests',
deployerId: "maven-deployer",
resolverId: "maven-resolver"
)
rtPublishBuildInfo(
serverId: "opencollab-artifactory"
)
}
}
}
}

0 comments on commit 4f5b210

Please sign in to comment.