From 228bc436d50cf4638683e317f4f2e23bcef583be Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Sun, 24 Sep 2023 21:51:16 +0100 Subject: [PATCH] get ready for github actions to make the releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cannot have git tag trigger it, because a tag is created by the release process, so i’m not sure of a better way to trigger this than every successful run --- .github/workflows/java.yml | 31 ++++++++++++++++++++ .github/workflows/publish.yml | 53 ----------------------------------- pom.xml | 11 +++++++- 3 files changed, 41 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index cf2241d..12c6a66 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -46,3 +46,34 @@ jobs: - name: Test with Maven run: mvn -B test --file pom.xml working-directory: getargv.java + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + check-latest: true + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-passphrase: MAVEN_GPG_PASSPHRASE + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + - name: Publish package to Maven Central + run: mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + check-latest: true + server-id: github + - name: Publish package to GitHub Packages + run: mvn -DuseGithub=true --batch-mode deploy + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 9b32305..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Publish package to GitHub Packages and the Maven Central Repository - -on: - release: - types: [created] - -jobs: - publish: - runs-on: macos-latest - permissions: - contents: read - packages: write - steps: - - - uses: actions/checkout@v3 - with: - repository: getargv/getargv - path: getargv - token: ${{ secrets.GH_PAT }} - - name: Build libgetargv - run: make install_dylib - working-directory: getargv - - uses: actions/checkout@v3 - with: - path: getargv.java - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - check-latest: true - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: Publish package to Maven Central - run: mvn --batch-mode deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - check-latest: true - server-id: github - - name: Publish package to GitHub Packages - run: mvn -DuseGithub=true --batch-mode deploy - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/pom.xml b/pom.xml index 5bea19d..01c60d8 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,9 @@ !useGithub + + ask + ossrh @@ -76,9 +79,11 @@ useGithub - true + + loopback + github @@ -204,6 +209,10 @@ ${gpg_keyname} + + --pinentry-mode + ${pinentry-mode} +