1+
12# This GitHub Workflow is designed to run automatically after the Release PR, which was created by the `Create Release PR` workflow, is closed.
23# This workflow has 2 jobs. One will run if the `Release PR` is successfully merged, indicating that a release should go out.
34# The other will run if the `Release PR` was closed and a release is not intended to go out.
4- name : Sync 'v4sdk-development ' and 'v4sdk-release '
5+ name : Sync 'dev ' and 'main '
56
67# The workflow will automatically be triggered when any PR is closed.
78on :
@@ -13,15 +14,15 @@ permissions:
1314 id-token : write
1415
1516jobs :
16- # This job will check if the PR was successfully merged, it's source branch is `releases/next-release` and target branch is `v4sdk-development `.
17+ # This job will check if the PR was successfully merged, it's source branch is `releases/next-release` and target branch is `dev `.
1718 # This indicates that the merged PR was the `Release PR`.
18- # This job will synchronize `v4sdk-development ` and `v4sdk-release `, create a GitHub Release and delete the `releases/next-release` branch.
19+ # This job will synchronize `dev ` and `main `, create a GitHub Release and delete the `releases/next-release` branch.
1920 sync-dev-and-main :
20- name : Sync v4sdk-development and v4sdk-release
21+ name : Sync dev and main
2122 if : |
2223 github.event.pull_request.merged == true &&
2324 github.event.pull_request.head.ref == 'releases/next-release' &&
24- github.event.pull_request.base.ref == 'v4sdk-development '
25+ github.event.pull_request.base.ref == 'dev '
2526 runs-on : ubuntu-latest
2627 steps :
2728 # Assume an AWS Role that provides access to the Access Token
@@ -32,26 +33,26 @@ jobs:
3233 aws-region : us-west-2
3334 # Retrieve the Access Token from Secrets Manager
3435 - name : Retrieve secret from AWS Secrets Manager
35- uses : aws-actions/aws-secretsmanager-get-secrets@v2
36+ uses : aws-actions/aws-secretsmanager-get-secrets@fbd65ea98e018858715f591f03b251f02b2316cb # v2.0.8
3637 with :
3738 secret-ids : |
3839 AWS_SECRET, ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_NAME }}
3940 parse-json-secrets : true
4041 # Checkout a full clone of the repo
4142 - name : Checkout code
42- uses : actions/checkout@v4
43+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4344 with :
44- ref : v4sdk-development
45+ ref : dev
4546 fetch-depth : 0
4647 token : ${{ env.AWS_SECRET_TOKEN }}
4748 # Install .NET8 which is needed for AutoVer
4849 - name : Setup .NET 8.0
49- uses : actions/setup-dotnet@v4
50+ uses : actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
5051 with :
5152 dotnet-version : 8.0.x
5253 # Install AutoVer which is needed to retrieve information about the current release.
5354 - name : Install AutoVer
54- run : dotnet tool install --global AutoVer --version 0.0.21
55+ run : dotnet tool install --global AutoVer --version 0.0.25
5556 # Set up a git user to be able to run git commands later on
5657 - name : Setup Git User
5758 run : |
@@ -75,13 +76,13 @@ jobs:
7576 run : |
7677 changelog=$(autover changelog --output-to-console)
7778 echo "CHANGELOG<<EOF"$'\n'"$changelog"$'\n'EOF >> "$GITHUB_OUTPUT"
78- # Merge v4sdk-development into v4sdk-release in order to synchronize the 2 branches
79- - name : Merge v4sdk-development to v4sdk-release
79+ # Merge dev into main in order to synchronize the 2 branches
80+ - name : Merge dev to main
8081 run : |
8182 git fetch origin
82- git checkout v4sdk-release
83- git merge v4sdk-development
84- git push origin v4sdk-release
83+ git checkout main
84+ git merge dev
85+ git push origin main
8586 # Create the GitHub Release
8687 - name : Create GitHub Release
8788 env :
@@ -93,31 +94,31 @@ jobs:
9394 run : |
9495 git fetch origin
9596 git push origin --delete releases/next-release
96- # This job will check if the PR was closed, it's source branch is `releases/next-release` and target branch is `v4sdk-development `.
97+ # This job will check if the PR was closed, it's source branch is `releases/next-release` and target branch is `dev `.
9798 # This indicates that the closed PR was the `Release PR`.
9899 # This job will delete the tag created by AutoVer and the release branch.
99100 clean-up-closed-release :
100101 name : Clean up closed release
101102 if : |
102103 github.event.pull_request.merged == false &&
103104 github.event.pull_request.head.ref == 'releases/next-release' &&
104- github.event.pull_request.base.ref == 'v4sdk-development '
105+ github.event.pull_request.base.ref == 'dev '
105106 runs-on : ubuntu-latest
106107 steps :
107108 # Checkout a full clone of the repo
108109 - name : Checkout code
109- uses : actions/checkout@v4
110+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110111 with :
111112 ref : releases/next-release
112113 fetch-depth : 0
113114 # Install .NET8 which is needed for AutoVer
114115 - name : Setup .NET 8.0
115- uses : actions/setup-dotnet@v4
116+ uses : actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
116117 with :
117118 dotnet-version : 8.0.x
118119 # Install AutoVer which is needed to retrieve information about the current release.
119120 - name : Install AutoVer
120- run : dotnet tool install --global AutoVer --version 0.0.21
121+ run : dotnet tool install --global AutoVer --version 0.0.25
121122 # Set up a git user to be able to run git commands later on
122123 - name : Setup Git User
123124 run : |
0 commit comments