Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(github-page): fixing both github action to release #104

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/creating_pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release PR
name: Prepare Release PR

on:
workflow_dispatch:
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,39 @@ jobs:
if: env.has_release_label == 'true'
run: helm dependency update .

- name: Run chart-releaser
if: env.has_release_label == 'true'
uses: helm/[email protected]
with:
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Deploy to GitHub Pages
if: env.has_release_label == 'true'
run: |
git checkout gh-pages
git pull origin gh-pages --rebase
helm package . --destination charts/
helm repo index . --url https://getlago.github.io/charts
git add .
git commit -m "Update Helm repo index after release"
git push origin gh-pages

- name: Extract version from Chart.yaml
if: env.has_release_label == 'true'
id: get_version
run: |
version=$(grep '^version:' Chart.yaml | awk '{print $2}')
echo "Extracted version: $version"
echo "version=$version" >> $GITHUB_ENV

- name: Create Git tag
if: env.has_release_label == 'true'
run: |
git tag "v${{ env.version }}"
git push origin "v${{ env.version }}"

- name: Create GitHub Release
if: env.has_release_label == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ env.version }}"
release_name: "Release v${{ env.version }}"
body: "Release of version v${{ env.version }}"
draft: false
prerelease: false
Loading