From e43c3d898b49e89467b60b882de1dc08b2fcc38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Fri, 12 Jul 2024 17:02:15 +0200 Subject: [PATCH] chore: github action 'publish' --- .github/configs/cr.yaml | 12 +++++++ .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ charts/penpot/Chart.yaml | 2 +- charts/penpot/README.md | 2 +- 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .github/configs/cr.yaml create mode 100644 .github/workflows/release.yml diff --git a/.github/configs/cr.yaml b/.github/configs/cr.yaml new file mode 100644 index 0000000..f805cca --- /dev/null +++ b/.github/configs/cr.yaml @@ -0,0 +1,12 @@ +--- +# cr.yaml +## Reference: https://github.com/helm/chart-releaser +index-path: "./index.yaml" +# Set to true for GPG signing +sign: true +# UID of the GPG key to use +key: Kaleidos INC +# Enable automatic generation of release notes using GitHubs release notes +# generator. See: +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes +generate-release-notes: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9bf30b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: Release Charts + +on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + type: choice + options: + - info + - warning + - debug + push: + #branches: + # - main + paths: + - "charts/**" + + +jobs: + release: + # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions + # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token + permissions: + contents: write # for helm/chart-releaser-action to push chart release and create a release + packages: write # to push OCI chart package to GitHub Registry + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v4 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + # Optional step if GPG signing is used + - name: Prepare GPG key + run: | + gpg_dir=.cr-gpg + keyring="$gpg_dir/secring.gpg" + passphrase_file="$gpg_dir/passphrase" + mkdir "$gpg_dir" + base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring" + echo "$GPG_PASSPHRASE" > "$passphrase_file" + echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV" + echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV" + env: + GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}" + GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + with: + config: "./.github/configs/cr.yaml" + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/penpot/Chart.yaml b/charts/penpot/Chart.yaml index a122561..074e002 100644 --- a/charts/penpot/Chart.yaml +++ b/charts/penpot/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -version: 0.1.0 # Chart version +version: 0.1.0-alpha-1 # Chart version appVersion: "2.0.3" # Penpot version type: application name: penpot diff --git a/charts/penpot/README.md b/charts/penpot/README.md index e6d9def..b9ab07d 100644 --- a/charts/penpot/README.md +++ b/charts/penpot/README.md @@ -1,6 +1,6 @@ # penpot -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 2.0.3](https://img.shields.io/badge/AppVersion-2.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.1.0-alpha-1](https://img.shields.io/badge/Version-0.1.0--alpha--1-informational?style=flat-square) ![AppVersion: 2.0.3](https://img.shields.io/badge/AppVersion-2.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Helm chart for Penpot, the Open Source design and prototyping platform.