Skip to content

Commit

Permalink
Revert "Publish for Java 11 (was 17)"
Browse files Browse the repository at this point in the history
This reverts commit 0184a79.

# Conflicts:
#	.github/workflows/publish.yaml
  • Loading branch information
Virtlink committed Apr 2, 2024
1 parent 2b88e46 commit 1617c05
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 52 deletions.
41 changes: 14 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
---
name: Build

on: # yamllint disable-line rule:truthy
on:
push:
branches: [main]
branches: [main, master]
pull_request:
branches: [main]
branches: [main, master]

jobs:
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest]
java: [11, 17]
gradle: [wrapper]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/checkout@v3
- name: Setup JDK 17 (LTS)
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle ${{ matrix.gradle }}
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.gradle }}
build-scan-publish: true
build-scan-terms-of-service-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-service-agree: "yes"
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build
run: |
gradle build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: gradle/gradle-build-action@v2
with:
arguments: build
41 changes: 16 additions & 25 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# Publish
# =======
#
Expand All @@ -23,7 +22,7 @@
# 9. It can take a while for the new release to appear on Maven Central at:
# https://search.maven.org/artifact/com.virtlink.commons/commons-configuration2-jackson
# 10. Done!
#
#
#
# Setup
# -----
Expand Down Expand Up @@ -53,56 +52,48 @@
# gpg --export-secret-keys [keyid] | base64 > secring.gpg.b64
# ```


name: Publish to Maven Central

on: # yamllint disable-line rule:truthy
on:
push:
tags:
- "*.*.*"

jobs:
publish:
name: Publish to Maven Central
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
strategy:
matrix:
os: [ubuntu-latest] # Just one
java: [11] # Just one
gradle: [wrapper] # Just one
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/checkout@v3
- name: Setup JDK 17 (LTS)
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle ${{ matrix.gradle }}
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.gradle }}
build-scan-publish: false # Might contain private keys or sensitive information
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Decode GPG secret key ring
run: |
printf "${{ secrets.OSSRH_SIGNING_KEY_RING_FILE }}" | base64 --decode > "/home/runner/secring.gpg"
- name: Publish package to OSSRH
run: |
gradle assemble publish
uses: gradle/gradle-build-action@v2
with:
arguments: |
assemble publish
-Psigning.keyId=${{ secrets.OSSRH_SIGNING_KEY_ID }}
-Psigning.password=${{ secrets.OSSRH_SIGNING_KEY_PASSWORD }}
-Psigning.secretKeyRingFile=/home/runner/secring.gpg
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release on GitHub
uses: softprops/action-gh-release@v1
with:
name: "Release ${{ github.ref_name }}"
files: "**/build/libs/commons-configuration2-jackson-${{ github.ref_name }}*"
files: build/libs/commons-configuration2-jackson-${{ github.ref_name }}*
fail_on_unmatched_files: true

0 comments on commit 1617c05

Please sign in to comment.