fix(ci): Helm chart was not automatically released

This commit is contained in:
Julian Tölle 2020-05-12 01:28:30 +02:00
parent 3dd45b4620
commit ff0c1553f0
3 changed files with 43 additions and 6 deletions

27
.github/workflows/helm-repo-index.yaml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Helm repo index
on: release
jobs:
publish:
name: Publish helm repo index to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Generate index.yaml
uses: docker://quay.io/helmpack/chart-releaser:v1.0.0-beta.1
run: |
mkdir .helm-index
cr index \
--charts-repo https://apricote.github.io/Listory
--package-path charts
--owner owner
--git-repo Listory
--index-path .helm-index/index.yaml
- name: Publish to gh-pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: .helm-index # The folder the action should deploy.

View file

@ -10,10 +10,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install Helm
uses: azure/setup-helm@v1
with:
helm-version: "v3.2.1"
- name: Install semantic-release
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/exec semantic-release-docker
@ -23,8 +30,3 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: semantic-release
- name: Release Helm Chart
uses: helm/chart-releaser-action@v1.0.0-rc.2
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View file

@ -21,6 +21,11 @@ plugins:
-e "s/version: .*/version: ${nextRelease.version}/g" \
-e "s/appVersion: .*/appVersion: ${nextRelease.version}/g" \
$CHART_FILE
# Package Helm Chart
mkdir .helm-chart
helm package charts/listory --destination .helm-charts
- - semantic-release-docker
- name: apricote/listory
- - "@semantic-release/git"
@ -29,4 +34,7 @@ plugins:
- package.json
- package-lock.json
- charts/listory/Chart.yaml
- "@semantic-release/github"
- - "@semantic-release/github"
- assets:
- path: .helm-chart/listory-*.tgz
label: Helm Chart