Skip to content

Commit

Permalink
fix: update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleet committed Nov 19, 2022
1 parent 24e7b85 commit 56ef6b8
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,45 @@ jobs:
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Push to tag
uses: ad-m/github-push-action@master
if: always()
with:
github_token: ${{ secrets.GH_ORG_TOKEN }}
branch: ${{ steps.version.outputs.version_tag }}
tags: true

- name: Update version in helm values
- name: Update image.tag in helm values (Optional)
if: inputs.container
uses: mikefarah/yq@master
with:
cmd: yq -i '.image.tag = "${{ steps.version.outputs.version_tag }}"' helm/values.yaml

- name: Update version in helm chart
- name: Update version in helm chart (Optional)
if: inputs.helm
uses: mikefarah/yq@master
with:
cmd: yq -i '.version = "${{ steps.version.outputs.version_tag }}"' helm/Chart.yaml

- name: Commit changes
- name: Commit changes (Optional)
if: inputs.helm || inputs.container
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "chore: set version to ${{ steps.version.outputs.version_tag }}"
git tag -a ${{ steps.version.outputs.version_tag }} -m "${{ steps.version.outputs.version_tag }}"

- name: Push to tag
- name: Push to version updates to tag (Optional)
uses: ad-m/github-push-action@master
if: always()
if: inputs.helm || inputs.container
with:
github_token: ${{ secrets.GH_ORG_TOKEN }}
branch: ${{ steps.version.outputs.version_tag }}
tags: true

- name: Release
uses: softprops/action-gh-release@v1
if: always()
with:
tag_name: ${{ steps.version.outputs.version_tag }}
generate_release_notes: true
Expand Down

0 comments on commit 56ef6b8

Please sign in to comment.