mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 10:45:23 +08:00
Merge branch 'master' into patch-2
This commit is contained in:
48
.github/workflows/deployment.yml
vendored
Normal file
48
.github/workflows/deployment.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# For more information see:
|
||||
# * https://docs.github.com/en/actions/learn-github-actions
|
||||
# * https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
||||
# * https://github.com/actions/setup-java/blob/v3.13.0/docs/advanced-usage.md#Publishing-using-Apache-Maven
|
||||
#
|
||||
|
||||
name: Deployment workflow
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Java for publishing to Maven Central Repository
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
# Use lowest supported LTS Java version
|
||||
java-version: '8'
|
||||
distribution: 'temurin'
|
||||
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
server-username: MAVEN_USERNAME # env variable for username in deploy
|
||||
server-password: MAVEN_PASSWORD # env variable for token in deploy
|
||||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
|
||||
|
||||
- name: Publish to the Maven Central Repository
|
||||
run: mvn --batch-mode deploy
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||
# - name: Set up Java for publishing to GitHub Packages
|
||||
# uses: actions/setup-java@v3
|
||||
# with:
|
||||
# # Use lowest supported LTS Java version
|
||||
# java-version: '8'
|
||||
# distribution: 'temurin'
|
||||
# - name: Publish to GitHub Packages
|
||||
# run: mvn --batch-mode deploy
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
14
.github/workflows/pipeline.yml
vendored
14
.github/workflows/pipeline.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# This workflow will build a Java project with Maven
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
# For more information see: https://docs.github.com/en/actions/learn-github-actions or https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
@@ -37,13 +37,21 @@ jobs:
|
||||
mvn site -DgenerateReports=false -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }}
|
||||
- name: Upload Test Results ${{ matrix.java }}
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Test Results ${{ matrix.java }}
|
||||
path: target/surefire-reports/
|
||||
- name: Upload Test Report ${{ matrix.java }}
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Test Report ${{ matrix.java }}
|
||||
path: target/site/
|
||||
- name: Package Jar ${{ matrix.java }}
|
||||
run: mvn clean package -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true
|
||||
- name: Upload Package Results ${{ matrix.java }}
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package Jar ${{ matrix.java }}
|
||||
path: target/*.jar
|
||||
|
Reference in New Issue
Block a user