Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release workflow #93

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/mvn-deploy-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Logback Appender Maven CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MVN_MASTER_PASSWORD: ${{ secrets.MVN_MASTER_PASSWORD }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: 11
- name: Create settings-security.xml
run: |
echo '<settingsSecurity>' > ~/.m2/settings-security.xml
echo " <master>${{ secrets.MVN_MASTER_PASSWORD }}</master>" >> ~/.m2/settings-security.xml
echo '</settingsSecurity>' >> ~/.m2/settings-security.xml
- name: Release Maven package
uses: samuelmeuli/[email protected]
with:
maven_profiles: deploy
gpg_private_key: ${{ secrets.GPG_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
server_id: ossrh-nexus
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
<arg>--no-tty</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -209,4 +217,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
Binary file removed release/codesigning.asc.enc
Binary file not shown.
3 changes: 3 additions & 0 deletions release/settings-security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<settingsSecurity>
<master>${env.MVN_MASTER_PASSWORD }</master>
</settingsSecurity>
41 changes: 20 additions & 21 deletions release/settings.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<settings>
<servers>
<server>
<id>ossrh-nexus</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>ossrh-nexus</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEY}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>ossrh-nexus</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh-nexus</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEY}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
Loading