Skip to content

Commit

Permalink
Add harbor-helm release workflow
Browse files Browse the repository at this point in the history
1. Automating the release workflow
2. Release Notes Template

Signed-off-by: Yang Jiao <[email protected]>
  • Loading branch information
Yang Jiao authored and YangJiao0817 committed Jan 8, 2024
1 parent c7d2e6b commit 590e88e
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# .github/release.yml

changelog:
exclude:
labels:
- release-note/ignore-for-release
authors:
- octocat
categories:
- title: Exciting New Features πŸŽ‰
labels:
- release-note/new-feature
- title: Enhancement πŸš€
labels:
- release-note/enhancement
- title: Component updates ⬆️
labels:
- release-note/update
- title: Docs update πŸ—„οΈ
labels:
- release-note/docs
- title: Community update πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸΎ
labels:
- release-note/community

- title: Breaking Changes πŸ› 
labels:
- release-note/breaking-change

- title: Deprecations ❌
labels:
- release-note/deprecation

- title: Other Changes
labels:
- "*"
32 changes: 32 additions & 0 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Release

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: install
- name: Helm Package
run: echo "PACKAGE_PATH=$(helm package ../harbor-helm | awk '{print $NF}')" >> $GITHUB_ENV
- name: Publish Helm Chart
run: |
helm registry login registry-1.docker.io -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
helm push ${{ env.PACKAGE_PATH }} oci://registry-1.docker.io/${{ secrets.DOCKER_HUB_USERNAME }}
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
helm push ${{ env.PACKAGE_PATH }} oci://ghcr.io/${{ github.actor }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.PACKAGE_PATH }}

0 comments on commit 590e88e

Please sign in to comment.