ci: improve release notes (#5) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
permissions: | |
packages: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: Set Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install deps | |
run: npm i -q --no-save @semantic-release/exec @semantic-release/git | |
- name: Release a new version | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
- name: Setup Helm | |
uses: azure/setup-helm@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to GHCR | |
run: echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin | |
- name: Package Chart | |
run: helm package . | |
- name: Build Helm repository name | |
run: echo "HELM_REPOSITORY_OWNER=${OWNER,,}" >>${GITHUB_ENV} | |
env: | |
OWNER: ${{ github.repository_owner }} | |
- name: Push charts to GHCR | |
run: helm push ./sniffer-*.tgz oci://ghcr.io/${{ env.HELM_REPOSITORY_OWNER }} |