V1.14.0: updates to JCOBridge 2.5.13 and removed .NET 7 #39
Workflow file for this run
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 is a basic workflow to help you get started with Actions | |
name: CI_RELEASE | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
release: | |
types: | |
- published | |
- edited | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build_maven_and_deploy: | |
# The type of runner that the job will run on | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
framework: [ 'net462', 'net6.0', 'net8.0' ] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Runs a set of commands using the runners shell | |
# Support longpaths | |
- name: Support long paths | |
run: git config --system core.longpaths true | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Runs a set of commands using the runners shell | |
- name: Build JCOReflectorCLI | |
run: dotnet build --no-incremental --framework ${{ matrix.framework }} --configuration Release /p:Platform="Any CPU" src\net\JCOReflectorCLI.sln | |
# Runs a set of commands using the runners shell | |
- name: Copy configuration file | |
if: matrix.framework != 'net462' | |
run: Copy-Item .github\workflows\JCOReflectorCLI_${{ matrix.framework }}.runtimeconfig.json -Destination bin\${{ matrix.framework }}\MASES.JCOReflectorCLI.runtimeconfig.json -Force | |
- name: Build Maven POM files | |
run: .\bin\${{ matrix.framework }}\MASES.JCOReflectorCLI -JobType CreatePOM -POMStagingType Release -JobFile .github\workflows\createpom_win19.job | |
- name: Set up Apache Maven Central | |
uses: actions/setup-java@v4 | |
with: # running setup-java again overwrites the settings.xml | |
distribution: temurin | |
java-version: 11 | |
cache: 'maven' | |
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_CENTRAL_TOKEN # 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: Install local file to be used within Javadoc section of generated POM | |
shell: bash | |
run: mvn install:install-file --no-transfer-progress -Dfile=../../../bin/${{ matrix.framework }}/JCOBridge.jar -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -f ./src/jvm/src/${{ matrix.framework }}.xml | |
- name: Publish ${{ matrix.framework }} to Apache Maven Central | |
shell: bash | |
run: mvn --file ./src/jvm/src/${{ matrix.framework }}.xml --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
build_release: | |
needs: [build_maven_and_deploy] | |
# The type of runner that the job will run on | |
runs-on: windows-2022 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Runs a set of commands using the runners shell | |
# Support longpaths | |
- name: Support long paths | |
run: git config --system core.longpaths true | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
# Runs a set of commands using the runners shell | |
- name: Build JCOReflectorCLI | |
run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" src\net\JCOReflectorCLI.sln | |
- uses: nuget/[email protected] | |
with: | |
nuget-version: '5.x' | |
- run: nuget pack src\net\CLI\JCOReflectorCLI.nuspec -OutputDirectory .\bin | |
# Runs a set of commands using the runners shell | |
- name: Copy configuration file | |
run: | | |
Copy-Item .github\workflows\JCOReflectorCLI_net6.0.runtimeconfig.json -Destination bin\net6.0\MASES.JCOReflectorCLI.runtimeconfig.json -Force | |
Copy-Item .github\workflows\JCOReflectorCLI_net8.0.runtimeconfig.json -Destination bin\net8.0\MASES.JCOReflectorCLI.runtimeconfig.json -Force | |
- name: Build Java files | |
run: | | |
.\bin\net6.0\MASES.JCOReflectorCLI -JobType Build -JobFile .github\workflows\build_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
.\bin\net8.0\MASES.JCOReflectorCLI -JobType Build -JobFile .github\workflows\build_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
.\bin\net462\MASES.JCOReflectorCLI -JobType Build -JobFile .github\workflows\build_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
shell: cmd | |
- name: Build JAR files | |
run: | | |
.\bin\net6.0\MASES.JCOReflectorCLI -JobType CreateJars -JobFile .github\workflows\createjars_net6.0_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
.\bin\net8.0\MASES.JCOReflectorCLI -JobType CreateJars -JobFile .github\workflows\createjars_net8.0_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
.\bin\net462\MASES.JCOReflectorCLI -JobType CreateJars -JobFile .github\workflows\createjars_net462_win19.job -JDKFolder %JAVA_HOME_11_X64% | |
shell: cmd | |
- name: Compress release files | |
run: | | |
Compress-Archive -Path .\bin\net6.0\* -DestinationPath .\bin\net6.0.zip | |
Compress-Archive -Path .\bin\net8.0\* -DestinationPath .\bin\net8.0.zip | |
Compress-Archive -Path .\bin\net462\* -DestinationPath .\bin\net462.zip | |
- name: Compress documentation files | |
run: | | |
Compress-Archive -Path .\docs\net6.0\* -DestinationPath .\net6.0.docs.zip | |
Compress-Archive -Path .\docs\net8.0\* -DestinationPath .\net8.0.docs.zip | |
Compress-Archive -Path .\docs\net462\* -DestinationPath .\net462.docs.zip | |
- name: Upload net6.0 binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\bin\net6.0.zip | |
asset_name: net6.0.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload net8.0 binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\bin\net8.0.zip | |
asset_name: net8.0.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload net462 binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\bin\net462.zip | |
asset_name: net462.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload net6.0 documentation to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\net6.0.docs.zip | |
asset_name: net6.0.docs.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload net8.0 documentation to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\net8.0.docs.zip | |
asset_name: net8.0.docs.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload net462 documentation to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: .\net462.docs.zip | |
asset_name: net462.docs.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Publish to NuGet | |
run: | | |
nuget push .\bin\*.nupkg -ApiKey ${{ secrets.MASES_NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate | |
nuget push .\bin\*.snupkg -ApiKey ${{ secrets.MASES_NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate |