1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : CI_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+ NewVersion :
15+ description : ' The new version'
16+ required : true
17+ type : string
18+
19+ # This workflow contains one job called "build_documentation"
20+ jobs :
21+ update_version :
22+ # The type of runner that the job will run on
23+ runs-on : windows-2022
24+
25+ # Steps represent a sequence of tasks that will be executed as part of the job
26+ steps :
27+ # Runs a set of commands using the runners shell
28+ # Support longpaths
29+ - name : Support long paths
30+ run : git config --system core.longpaths true
31+
32+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
33+ - uses : actions/checkout@v6
34+ with :
35+ fetch-depth : ' 1'
36+ submodules : ' true'
37+
38+ - run : (Get-Content ${{ github.workspace }}\src\jvm\knet\pom.xml).Replace('<knetversion>${{ inputs.CurrentVersion }}.0</knetversion>', '<knetversion>${{ inputs.NewVersion }}.0</knetversion>') | Set-Content ${{ github.workspace }}\src\jvm\knet\pom.xml
39+
40+ - run : (Get-Content ${{ github.workspace }}\src\net\Common\Common.props).Replace('<Version>${{ inputs.CurrentVersion }}.0</Version>', '<Version>${{ inputs.NewVersion }}.0</Version>') | Set-Content ${{ github.workspace }}\src\net\Common\Common.props
41+
42+ - run : (Get-Content ${{ github.workspace }}\src\net\KNetCLI\KNetCLI.nuspec).Replace('<version>${{ inputs.CurrentVersion }}</version>', '<version>${{ inputs.NewVersion }}</version>') | Set-Content ${{ github.workspace }}\src\net\KNetCLI\KNetCLI.nuspec
43+ - run : (Get-Content ${{ github.workspace }}\src\net\KNetConnect\KNetConnect.nuspec).Replace('<version>${{ inputs.CurrentVersion }}</version>', '<version>${{ inputs.NewVersion }}</version>') | Set-Content ${{ github.workspace }}\src\net\KNetConnect\KNetConnect.nuspec
44+
45+ - run : (Get-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPS.psd1).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPS.psd1
46+ - run : (Get-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPSCore.psd1).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPSCore.psd1
47+ - run : (Get-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPSFramework.psd1).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\KNetPS\MASES.KNetPSFramework.psd1
48+
49+ - run : (Get-Content ${{ github.workspace }}\src\net\templates\templates\knetConnectSink\knetConnectSink.csproj).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\knetConnectSink\knetConnectSink.csproj
50+ - run : (Get-Content ${{ github.workspace }}\src\net\templates\templates\knetConnectSource\knetConnectSource.csproj).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\knetConnectSource\knetConnectSource.csproj
51+ - run : (Get-Content ${{ github.workspace }}\src\net\templates\templates\knetConsumerApp\knetConsumerApp.csproj).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\knetConsumerApp\knetConsumerApp.csproj
52+ - run : (Get-Content ${{ github.workspace }}\src\net\templates\templates\knetPipeStreamApp\knetPipeStreamApp.csproj).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\knetPipeStreamApp\knetPipeStreamApp.csproj
53+ - run : (Get-Content ${{ github.workspace }}\src\net\templates\templates\knetProducerApp\knetProducerApp.csproj).Replace('${{ inputs.CurrentVersion }}', '${{ inputs.NewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\knetProducerApp\knetProducerApp.csproj
54+
55+ - name : Request a PR to commit changes
56+ uses : peter-evans/create-pull-request@v7
57+ with :
58+ branch-suffix : short-commit-hash
59+ add-paths : src/*.*
60+ commit-message : Update version from ${{ inputs.CurrentVersion }} to ${{ inputs.NewVersion }}
61+ title : Update version from ${{ inputs.CurrentVersion }} to ${{ inputs.NewVersion }}
62+ body : |
63+ Automated changes by GitHub action fix #121
64+ reviewers : masesdevelopers
65+ assignees : masesdevelopers
66+ labels : enhancement, Docker, java, KNet, KNetCLI, KNetConnectSDK, KNetPS, KNetSerDes, KNetTemplates, .NET
0 commit comments