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

feat: Create Helm Chart and attach to release only on Release creation #4

Merged
merged 2 commits into from
Jan 10, 2025
Merged
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
25 changes: 8 additions & 17 deletions .github/workflows/github-build-release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: Upload HelmChart To Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching semver, i.e. 1.0.0

name: Build and create release

release:
types: [created]
jobs:
build:
name: Build and upload release binary
#if: github.event.base_ref == 'refs/heads/master' # only run if on master branch
name: Build and Upload helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -26,17 +22,12 @@ jobs:
echo "CHART_VERSION=${{ steps.chart.outputs.version }}" >> $GITHUB_ENV
- name: Package Helm Chart
run: tar -czvf ibm-connectivity-pack-${{env.CHART_VERSION}}.tgz -C ibm-connectivity-pack .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Release by Tag Name
uses: joutvhu/get-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
allowUpdates: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset Helm Chart
id: upload-release-asset-helm-chart
uses: actions/upload-release-asset@v1
Expand Down
Loading