Skip to content

Commit

Permalink
chore: change version update scheme for catalog env file (#3788)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>
  • Loading branch information
pablocarle and Pablo Hernán Carle authored Sep 24, 2024
1 parent 98b3394 commit dff86b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/automated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ jobs:
run: git config user.name "Zowe Robot"

- name: Release to NPM automatic
shell: bash
run: |
cd onboarding-enabler-nodejs
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "registry=$DIST_REGISTRY" >> ~/.npmrc
npm version ${{ github.event.inputs.scope || env.DEFAULT_SCOPE }}
npm version ${{ github.event.inputs.scope || env.DEFAULT_SCOPE }} --allow-same-version
npm publish --access public
git add package.json
git add package-lock.json
Expand All @@ -62,7 +63,14 @@ jobs:
DIST_REGISTRY: https://registry.npmjs.org/

- name: Release with Gradle automatic
run: ./gradlew release -x test -x checkstyleTest -Prelease.useAutomaticVersion=true -Prelease.scope=${{ github.event.inputs.scope || env.DEFAULT_SCOPE }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME
shell: bash
run: |
./gradlew release -x test -x checkstyleTest -Prelease.useAutomaticVersion=true -Prelease.scope=${{ github.event.inputs.scope || env.DEFAULT_SCOPE }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
released_version=$(cat gradle.properties | grep "version=" | sed "s/version=//g")
sed -i "/REACT_APP_ZOWE_BUILD_INFO=/c\REACT_APP_ZOWE_BUILD_INFO=${released_version}" api-catalog-ui/frontend/.env
git add api-catalog-ui/frontend/.env
git commit -m "[skip ci] Update version"
git push
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
Expand All @@ -82,5 +90,6 @@ jobs:
caching-service/build/reports/**
api-catalog-services/build/reports/**
zaas-service/build/reports/**
/home/runner/.npm/logs/**
- uses: ./.github/actions/teardown
13 changes: 11 additions & 2 deletions .github/workflows/binary-specific-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ jobs:
run: git config user.name "Zowe Robot"

- name: Release to NPM automatic
shell: bash
run: |
cd onboarding-enabler-nodejs
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "registry=$DIST_REGISTRY" >> ~/.npmrc
npm version ${{ github.event.inputs.release_version }}
npm version ${{ github.event.inputs.release_version }} --allow-same-version
npm publish --access public
git add package.json
git add package-lock.json
Expand All @@ -58,7 +59,14 @@ jobs:
DIST_REGISTRY: https://registry.npmjs.org/

- name: Release with Gradle automatic
run: ./gradlew release -x test -x checkstyleTest -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.new_version }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME
shell: bash
run: |
./gradlew release -x test -x checkstyleTest -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.new_version }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
released_version=$(cat gradle.properties | grep "version=" | sed "s/version=//g")
sed -i "/REACT_APP_ZOWE_BUILD_INFO=/c\REACT_APP_ZOWE_BUILD_INFO=${released_version}" api-catalog-ui/frontend/.env
git add api-catalog-ui/frontend/.env
git commit -m "[skip ci] Update version"
git push
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
Expand All @@ -76,5 +84,6 @@ jobs:
caching-service/build/reports/**
api-catalog-services/build/reports/**
zaas-service/build/reports/**
/home/runner/.npm/logs/**
- uses: ./.github/actions/teardown

0 comments on commit dff86b4

Please sign in to comment.