Skip to content

Commit

Permalink
Rework publishing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkopedia committed Feb 5, 2024
1 parent 02ebff6 commit 362f91a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 99 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/publish-macos.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/publish-windows.yaml

This file was deleted.

26 changes: 24 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
types: [created]
workflow_dispatch:
jobs:
publish:
publish-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- id: install-secret-key
name: Install gpg secret key
run: |
Expand All @@ -33,3 +33,25 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

publish-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 17
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Pre-build
run: gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}'

- name: Publish package
run: gradle publish -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}'
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit 362f91a

Please sign in to comment.