99
1010env :
1111 AWS_DEFAULT_REGION : us-east-1
12+ VERSION : ${{ github.event.inputs.version }}
1213
1314permissions :
1415 id-token : write
2728
2829 - name : Extract Major.Minor Version and setup Env variable
2930 run : |
30- echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
31- echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
31+ echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
3232
3333 - name : Get current major.minor version from main branch
3434 id : get_version
8585
8686 - name : Extract Major.Minor Version and setup Env variable
8787 run : |
88- echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
89- echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
88+ echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
9089
9190 - name : Determine release branch and checkout
9291 run : |
@@ -98,11 +97,11 @@ jobs:
9897 # TODO: change the version in daily scan like adot python did
9998 # sed -i 's/python:v.*"/python:v'$VERSION'"/' .github/workflows/daily_scan.yml
10099 run : |
101- DEV_VERSION="${{ github.event.inputs.version }}.dev0"
100+ DEV_VERSION="${{ env.VERSION }}.dev0"
102101 sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" aws-distro-opentelemetry-node-autoinstrumentation/package.json
103102 sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" docker-utils/package.json
104103 sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" package.json
105- VERSION="${{ github.event.inputs.version }}"
104+ VERSION="${{ env.VERSION }}"
106105 git add .
107106 git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
108107 git push --set-upstream origin "prepare-main-for-next-dev-cycle-${VERSION}"
@@ -111,7 +110,7 @@ jobs:
111110 env :
112111 GITHUB_TOKEN : ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
113112 run : |
114- DEV_VERSION="${{ github.event.inputs.version }}.dev0"
113+ DEV_VERSION="${{ env.VERSION }}.dev0"
115114 gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \
116115 --body "This PR prepares the main branch for the next development cycle by updating the version to $DEV_VERSION and updating the image version to be scanned to the latest released.
117116
0 commit comments