Skip to content

Commit 2bb4e46

Browse files
fix: cleaner workflow for tag release
1 parent 25227cf commit 2bb4e46

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

.github/workflows/release-with-version.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,33 @@ jobs:
156156
echo "Pushing tag: ${{ env.NEW_TAG }}"
157157
git push origin ${{ env.NEW_TAG }}
158158
159-
- name: Trigger CI workflow for release
159+
- name: Wait for tag propagation
160160
run: |
161-
echo "Waiting for tag to be visible..."
162-
sleep 10 # Give GitHub time to process the tag
163-
164-
echo "Triggering CI workflow for tag ${{ env.NEW_TAG }}"
165-
gh workflow run ci.yml --ref ${{ env.NEW_TAG }}
161+
echo "Waiting for tag to propagate..."
162+
sleep 10
163+
164+
- name: Create GitHub Release
165+
uses: helm/[email protected]
166+
env:
167+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168+
CR_SKIP_EXISTING: true
169+
170+
- name: Deploy docs to GitHub Pages
171+
run: |
172+
git config --global user.name 'github-actions[bot]'
173+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
174+
git fetch origin
175+
if git show-ref --quiet refs/remotes/origin/gh-pages; then
176+
git checkout gh-pages
177+
git checkout ${{ env.NEW_TAG }} -- docs
178+
git add docs
179+
git commit -m "Copy docs from ${{ env.NEW_TAG }}"
180+
git push origin gh-pages
181+
else
182+
echo "gh-pages branch doesn't exist, skipping docs deployment"
183+
fi
166184
env:
167-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168186

169187
- name: Generate release summary
170188
run: |
@@ -183,14 +201,10 @@ jobs:
183201
$(if [ '${{ github.event.inputs.update_app_version }}' = 'true' ]; then echo "- Updated Chart.yaml appVersion" >> $GITHUB_STEP_SUMMARY; fi)
184202
echo "- Ran tests and linting" >> $GITHUB_STEP_SUMMARY
185203
echo "- Created and pushed tag: ${{ env.NEW_TAG }}" >> $GITHUB_STEP_SUMMARY
204+
echo "- Created GitHub Release with Helm chart" >> $GITHUB_STEP_SUMMARY
205+
echo "- Deployed documentation to GitHub Pages" >> $GITHUB_STEP_SUMMARY
186206
echo "" >> $GITHUB_STEP_SUMMARY
187-
echo "### 📋 Next Steps" >> $GITHUB_STEP_SUMMARY
188-
echo "The CI workflow will automatically:" >> $GITHUB_STEP_SUMMARY
189-
echo "- Create a GitHub Release using helm/chart-releaser-action" >> $GITHUB_STEP_SUMMARY
190-
echo "- Publish the Helm chart to GitHub Pages" >> $GITHUB_STEP_SUMMARY
191-
echo "- Deploy documentation to GitHub Pages" >> $GITHUB_STEP_SUMMARY
192-
echo "" >> $GITHUB_STEP_SUMMARY
193-
echo "🚀 **Monitor the [CI workflow](https://github.com/${{ github.repository }}/actions/workflows/ci.yml) for release completion!**" >> $GITHUB_STEP_SUMMARY
207+
echo "🚀 **Chart release is now complete and available!**" >> $GITHUB_STEP_SUMMARY
194208
195209
notify-completion:
196210
needs: release

0 commit comments

Comments
 (0)