Skip to content

Commit

Permalink
Setup release workflow for dbutils scala
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Aug 31, 2023
1 parent d82fa33 commit abc7ba4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: 8
server-id: ossrh
distribution: "adopt"
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Publish to the Maven Central Repository
run: mvn -DskipTests=true --batch-mode deploy
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: target/*.jar
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,19 @@
</pom>
</configuration>
</plugin>
<!-- Release plugin -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- change to true after testing -->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit abc7ba4

Please sign in to comment.