This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update cryptobox version * first draft of pipeline * trigger the release workflow * delete the trigger on push * fix typo * fix jar signing issue * dispatch the maven release workflow only on releases * update junit to latest version * make tests more robust * update cryptobox image to JVM 11 * release with jvm 11 pipeline
- Loading branch information
1 parent
198132c
commit 649d0b1
Showing
9 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Release to Maven Central | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
container: wirebot/cryptobox:latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Execute Tests | ||
run: | | ||
mvn test -DargLine="-Djava.library.path=$LD_LIBRARY_PATH" | ||
- name: Try to create package | ||
run: | | ||
mvn package -DskipTests | ||
- name: Webhook to Wire | ||
uses: 8398a7/action-slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
author_name: Test execution before release | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.WEBHOOK_CI }} | ||
if: failure() | ||
|
||
release: | ||
needs: [ tests ] | ||
name: Release on Sonatype OSS | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Build with Maven | ||
run: mvn -DskipTests package | ||
|
||
- name: Set up Apache Maven Central | ||
uses: actions/setup-java@v1 | ||
with: # running setup-java again overwrites the settings.xml | ||
java-version: 1.8 | ||
server-id: ossrh | ||
server-username: OSSRH_USERNAME | ||
server-password: OSSRH_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Publish to Apache Maven Central | ||
run: mvn -DskipTests deploy | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
# Send webhook to Wire using Slack Bot | ||
- name: Webhook to Wire | ||
uses: 8398a7/action-slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
author_name: Release to Maven Central | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.WEBHOOK_CI }} | ||
# Send message only if previous step failed | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters