diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fc265c32..28cb45d0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -152,18 +152,9 @@ jobs: 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: Create Jars run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Compile command line run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src\net\NetPDFCLI\NetPDFCLI.csproj @@ -238,18 +229,9 @@ jobs: 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: Create Jars run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1d50ab21..fcbe7f11 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -44,18 +44,9 @@ jobs: 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: Create Jars run: mvn --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/generateclasses.yaml b/.github/workflows/generateclasses.yaml index 4090995b..d0329ec4 100644 --- a/.github/workflows/generateclasses.yaml +++ b/.github/workflows/generateclasses.yaml @@ -42,7 +42,7 @@ jobs: DOTNET_EnableCrashReport: 1 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ENCODED_2_6_5 }} JNet_Version: 2.6.5 - PDFBox_Version: 3.0.6 + PDFBox_Version: 3.0.7 FONTCACHE_FOLDER: ${{ github.workspace }}\fontcache # Steps represent a sequence of tasks that will be executed as part of the job @@ -81,24 +81,15 @@ jobs: 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: Create Jars run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Clear C# generated files run: Remove-Item .\src\net\NetPDF\Generated\* -Recurse -Force -Exclude README.md - name: Clear Java generated files - run: Remove-Item .\src\jvm\netpdf\src\main\java\org\mases\netpdf\generated\* -Recurse -Force -Exclude README.md + run: Remove-Item .\src\jvm\netpdf\src\main\java\org\mases\netpdf\generated\* -Recurse -Force -Exclude README.md,.editorconfig - name: Get last workflow run of JNet if: ${{ inputs.UseLastRepositoryBuild == true }} @@ -130,10 +121,6 @@ jobs: - name: Create Jars of JNetReflector if: ${{ inputs.UseLatestJNetReflectorSource == true }} run: mvn "-Djcobridgepath=../../../binReflector/net8.0/JCOBridge.jar" --file ./JNet/src/jvm/jnet/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Build JNetReflector if: ${{ inputs.UseLatestJNetReflectorSource == true }} diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml index dbcdb362..0380bc0a 100644 --- a/.github/workflows/pullrequest.yaml +++ b/.github/workflows/pullrequest.yaml @@ -90,18 +90,9 @@ jobs: 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: Create Jars run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Build Docker Image run: docker build -t netpdf -f ./src/container/Dockerfile.linux . @@ -145,18 +136,9 @@ jobs: 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: Create Jars run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Compile command line run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src\net\NetPDFCLI\NetPDFCLI.csproj diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8f5a57bf..71110126 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -46,18 +46,9 @@ jobs: 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: Create Jars run: mvn --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Compile NetPDF CLI run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src\net\NetPDFCLI\NetPDFCLI.csproj diff --git a/.github/workflows/update_version.yaml b/.github/workflows/update_version.yaml new file mode 100644 index 00000000..e5b745b1 --- /dev/null +++ b/.github/workflows/update_version.yaml @@ -0,0 +1,68 @@ +# This is a basic workflow to help you get started with Actions + +name: "Change version" + +# Controls when the action will run. Triggers the workflow on push +# events but only for the master branch +on: + workflow_dispatch: + inputs: + CurrentVersion: + description: 'The current version' + required: true + type: string + PreReleaseCurrentVersion: + description: 'The current version pre-release tag' + required: false + type: string + NewVersion: + description: 'The new version' + required: true + type: string + PreReleaseNewVersion: + description: 'The new version pre-release tag' + required: false + type: string + +# This workflow contains one job called "build_documentation" +jobs: + update_version: + # 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@v6 + with: + fetch-depth: '1' + + - run: (Get-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml).Replace('${{ inputs.CurrentVersion }}.0', '${{ inputs.NewVersion }}.0') | Set-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml + + - run: (Get-Content ${{ github.workspace }}\src\net\Common\Common.props).Replace('${{ inputs.CurrentVersion }}.0${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}.0${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\Common\Common.props + + - run: (Get-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec + + - run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPS.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPS.psd1 + - run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSCore.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSCore.psd1 + - run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSFramework.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSFramework.psd1 + + - run: (Get-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj + + - name: Request a PR to commit changes + uses: peter-evans/create-pull-request@v8 + with: + branch-suffix: short-commit-hash + add-paths: src/*.* + commit-message: Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }} + title: Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }} + body: | + Automated changes by GitHub action fix #47 + reviewers: masesdevelopers + assignees: masesdevelopers + labels: enhancement, Docker, java, NetPDF, NetPDF CLI, NetPDF PowerShell, NetPDF Template, .NET \ No newline at end of file diff --git a/src/jvm/netpdf/pom.xml b/src/jvm/netpdf/pom.xml index 34f8de12..a163e4fb 100644 --- a/src/jvm/netpdf/pom.xml +++ b/src/jvm/netpdf/pom.xml @@ -44,7 +44,7 @@ ${basedir}/classpathfile.classpath false 2.6.5.0 - 3.0.6 + 3.0.7 3.0.9.0 ${basedir}/../../../ ${rootDir}/bin/net8.0/JCOBridge.jar diff --git a/src/net/NetPDF/Generated/.editorconfig b/src/net/NetPDF/Generated/.editorconfig new file mode 100644 index 00000000..7bd8da61 --- /dev/null +++ b/src/net/NetPDF/Generated/.editorconfig @@ -0,0 +1,6 @@ +[*.cs] +generated_code = true +dotnet_analyzer_diagnostic.severity = none +dotnet_diagnostic.CS0108.severity = none +dotnet_diagnostic.CS0419.severity = none +dotnet_diagnostic.CS1574.severity = none