Skip to content

Commit f96c57c

Browse files
committed
Update release flow to not force push back to release branch/tag
Allow CIM releases from master branch too
1 parent fb8558b commit f96c57c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

.github/workflows/release.yaml

+4-15
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
publish-to-npm:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Check workflow runs in a release branch
15+
- name: Check workflow runs in a release branch or is CIM release
1616
run: |
17-
if [[ "${{ github.event.release.target_commitish }}" != *releases* ]]; then
18-
echo "Expecting to be in a release branch, but we are in: ${{ github.event.release.target_commitish }}"
17+
if [[ "${{ github.event.release.target_commitish }}" != *releases* || ! "$GITHUB_REF_NAME" =~ -cim$ ]]; then
18+
echo "OCM: Expecting to be in a release branch, but we are in: ${{ github.event.release.target_commitish }}"
19+
echo "CIM: Not a CIM release, since tag does not end with '-cim'. Tag is: $GITHUB_REF_NAME"
1920
exit 1
2021
fi
2122
2223
- uses: actions/checkout@v3
2324
with:
24-
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
2525
ref: ${{ github.event.release.target_commitish }}
2626
fetch-depth: 0
2727

@@ -78,14 +78,3 @@ jobs:
7878
echo "Retrying..."
7979
done
8080
done
81-
82-
- name: Update the repo
83-
run: |
84-
for LIB in $(echo ${LIBS}); do
85-
git add libs/"${LIB}"/package.json
86-
done
87-
git add apps/assisted-ui/package.json
88-
git commit -m "Version ${GITHUB_REF_NAME}"
89-
git tag -f -a ${GITHUB_REF_NAME} -m "${GITHUB_REF_NAME}"
90-
git push origin ${GITHUB_REF_NAME} --force
91-
git push origin ${{ github.event.release.target_commitish }} --force

0 commit comments

Comments
 (0)