1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : " Change version"
4+
5+ # Controls when the action will run. Triggers the workflow on push
6+ # events but only for the master branch
7+ on :
8+ workflow_dispatch :
9+ inputs :
10+ CurrentVersion :
11+ description : ' The current version'
12+ required : true
13+ type : string
14+ PreReleaseCurrentVersion :
15+ description : ' The current version pre-release tag'
16+ required : false
17+ type : string
18+ NewVersion :
19+ description : ' The new version'
20+ required : true
21+ type : string
22+ PreReleaseNewVersion :
23+ description : ' The new version pre-release tag'
24+ required : false
25+ type : string
26+
27+ # This workflow contains one job called "build_documentation"
28+ jobs :
29+ update_version :
30+ # The type of runner that the job will run on
31+ runs-on : windows-2022
32+
33+ # Steps represent a sequence of tasks that will be executed as part of the job
34+ steps :
35+ # Runs a set of commands using the runners shell
36+ # Support longpaths
37+ - name : Support long paths
38+ run : git config --system core.longpaths true
39+
40+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41+ - uses : actions/checkout@v6
42+ with :
43+ fetch-depth : ' 1'
44+
45+ - run : (Get-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml).Replace('<netpdfversion>${{ inputs.CurrentVersion }}.0</netpdfversion>', '<netpdfversion>${{ inputs.NewVersion }}.0</netpdfversion>') | Set-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml
46+
47+ - run : (Get-Content ${{ github.workspace }}\src\net\Common\Common.props).Replace('<Version>${{ inputs.CurrentVersion }}.0${{ inputs.PreReleaseCurrentVersion }}</Version>', '<Version>${{ inputs.NewVersion }}.0${{ inputs.PreReleaseNewVersion }}</Version>') | Set-Content ${{ github.workspace }}\src\net\Common\Common.props
48+
49+ - run : (Get-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec).Replace('<version>${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}</version>', '<version>${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}</version>') | Set-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec
50+
51+ - 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
52+ - 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
53+ - 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
54+
55+ - 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
56+
57+ - name : Request a PR to commit changes
58+ uses : peter-evans/create-pull-request@v8
59+ with :
60+ branch-suffix : short-commit-hash
61+ add-paths : src/*.*
62+ commit-message : Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}
63+ title : Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}
64+ body : |
65+ Automated changes by GitHub action fix #47
66+ reviewers : masesdevelopers
67+ assignees : masesdevelopers
68+ labels : enhancement, Docker, java, NetPDF, NetPDF CLI, NetPDF PowerShell, NetPDF Template, .NET
0 commit comments