diff --git a/.github/workflows/chart-release.yml b/.github/workflows/chart-release.yml index 651a42ed..e63dd629 100644 --- a/.github/workflows/chart-release.yml +++ b/.github/workflows/chart-release.yml @@ -60,17 +60,13 @@ jobs: with: configuration: ".github/configuration.json" ignorePreReleases: true - outputFile: .github/release-notes.md + outputFile: charts/${{ env.CHART_NAME}}/CHANGELOG.md fromTag: chart/${{ env.CHART_NAME }}-${{ env.PREVIOUS_CHART_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Package Helm chart - run: | - mkdir -p .cr-index - cr package charts/${CHART_NAME} - cr upload "--release-name-template=chart/{{ .Name }}-{{ .Version }}" --release-notes-file=.github/release-notes.md - cr index "--release-name-template=chart/{{ .Name }}-{{ .Version }}" --push + run: make chart-release env: CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} CR_OWNER: ${{ github.repository_owner }} diff --git a/.gitignore b/.gitignore index 0e8f3959..09805bfd 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,8 @@ /data/intermediate/** /data/source/** /data/target/** + +# Chart +/charts/**/CHANGELOG.md +/.cr-index/ +/.cr-release-packages/ diff --git a/charts/charts.mk b/charts/charts.mk index 1e7ae8e5..ff36a563 100644 --- a/charts/charts.mk +++ b/charts/charts.mk @@ -24,5 +24,16 @@ chart-lint: chart-generate chart-docs ## Lint charts git diff --exit-code .PHONY: chart-clean -chart-clean: - rm -f $(helm_docs_bin) +chart-clean: ## Clean the Helm chart artifacts + rm -rf $(helm_docs_bin) .cr-index .cr-release-packages charts/*/CHANGELOG.md + +.PHONY: chart-release +chart-release: | .cr-index ## Release the Helm chart to GitHub +# CHART_NAME is given by GH action +# Download 'cr' manually from https://github.com/helm/chart-releaser/releases, 'go install' doesn't work... + cr package charts/$(CHART_NAME) + cr upload "--release-name-template=chart/{{ .Name }}-{{ .Version }}" --release-notes-file=CHANGELOG.md + cr index "--release-name-template=chart/{{ .Name }}-{{ .Version }}" --push + +.cr-index: + mkdir -p $@ diff --git a/charts/clustercode/Chart.yaml b/charts/clustercode/Chart.yaml index 347d72fd..e05b82e6 100644 --- a/charts/clustercode/Chart.yaml +++ b/charts/clustercode/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 +version: 0.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/clustercode/README.md b/charts/clustercode/README.md index 1e807e95..aa724d3a 100644 --- a/charts/clustercode/README.md +++ b/charts/clustercode/README.md @@ -1,6 +1,6 @@ # clustercode -![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Movie and Series conversion Operator with Ffmpeg @@ -15,7 +15,7 @@ Edit the README.gotmpl.md template instead. Install the CRDs: ```bash -kubectl apply -f https://github.com/ccremer/clustercode/releases/download/clustercode-0.4.0/crds.yaml +kubectl apply -f https://github.com/ccremer/clustercode/releases/download/clustercode-0.3.0/crds.yaml ``` To prepare the webhook server, you need `yq`, `openssl`, `base64` tools and run this: diff --git a/docs/docs.mk b/docs/docs.mk index d288e531..bbea4f0a 100644 --- a/docs/docs.mk +++ b/docs/docs.mk @@ -14,7 +14,9 @@ docs-preview: docs-build ## Preview Antora build in local web server and browser .PHONY: docs-publish docs-publish: export ANTORA_OUTPUT_DIR = $(docs_output_dir) -docs-publish: docs-build ## Publishes the documentation in gh-pages +docs-publish: docs-build | $(docs_output_dir) ## Publishes the documentation in gh-pages + touch $(docs_output_dir)/.nojekyll + wget -O $(docs_output_dir)/index.yaml https://raw.githubusercontent.com/$(PROJECT_OWNER)/$(PROJECT_NAME)/gh-pages/index.yaml npm --prefix ./docs run deploy .PHONY: .docs-clean @@ -24,3 +26,6 @@ docs-publish: docs-build ## Publishes the documentation in gh-pages # Download node packages docs/node_modules: npm --prefix ./docs install + +$(docs_output_dir): + mkdir -p $@ diff --git a/docs/package.json b/docs/package.json index 1fa60c31..fd1ea1a2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,7 +14,6 @@ "watch": "watch 'npm run build' modules", "serve": "reload -d ${ANTORA_OUTPUT_DIR} -b", "preview": "run-p watch serve", - "predeploy": "touch ${ANTORA_OUTPUT_DIR}/.nojekyll", "deploy": "gh-pages -d ${ANTORA_OUTPUT_DIR} --dotfiles -m \"Update documentation $(date --utc '+%Y-%m-%d %H:%M')\"" } }