diff --git a/.github/workflows/update_copyright.yaml b/.github/workflows/update_copyright.yaml new file mode 100644 index 0000000..3b6b73c --- /dev/null +++ b/.github/workflows/update_copyright.yaml @@ -0,0 +1,46 @@ +# This is a basic workflow to help you get started with Actions + +name: "Change copyright" + +# Controls when the action will run. Triggers the workflow on push +# events but only for the master branch +on: + workflow_dispatch: + inputs: + CurrentYear: + description: 'The current year' + required: true + type: string + NewYear: + description: 'The new year' + required: true + 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: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v6 + with: + fetch-depth: '1' + + - run: find ./src -type f -exec sed -i 's/${{ inputs.CurrentYear }}/${{ inputs.NewYear }}/g' {} + + - run: find ./tests -type f -exec sed -i 's/${{ inputs.CurrentYear }}/${{ inputs.NewYear }}/g' {} + + + - name: Request a PR to commit changes + uses: peter-evans/create-pull-request@v8 + with: + branch-suffix: short-commit-hash + add-paths: ./*.* + commit-message: Update copyright from ${{ inputs.CurrentYear }} to ${{ inputs.NewYear }} + title: Update copyright from ${{ inputs.CurrentYear }} to ${{ inputs.NewYear }} + body: | + Automated changes by GitHub action fix #128 + reviewers: masesdevelopers + assignees: masesdevelopers + labels: enhancement, Docker, java, PLCOnNet, PLCOnNet CLI, PLCOnNet PowerShell, PLCOnNet Template, .NET \ No newline at end of file diff --git a/tests/net/Common/Initializer.cs b/tests/net/Common/Initializer.cs index cae1eba..82508d0 100644 --- a/tests/net/Common/Initializer.cs +++ b/tests/net/Common/Initializer.cs @@ -1,5 +1,5 @@ /* -* Copyright 2025 MASES s.r.l. +* Copyright (c) 2025-2026 MASES s.r.l. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/net/PLCOnNetTest/Program.cs b/tests/net/PLCOnNetTest/Program.cs index fd1ba43..e1fed09 100644 --- a/tests/net/PLCOnNetTest/Program.cs +++ b/tests/net/PLCOnNetTest/Program.cs @@ -1,5 +1,5 @@ /* -* Copyright 2025 MASES s.r.l. +* Copyright (c) 2025-2026 MASES s.r.l. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.