Skip to content

Merge pull request #9 from PecanProject/upgrade-postgresql #13

Merge pull request #9 from PecanProject/upgrade-postgresql

Merge pull request #9 from PecanProject/upgrade-postgresql #13

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Helm
run: |
helm plugin install https://github.com/chartmuseum/helm-push.git
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
helm repo add ncsa https://opensource.ncsa.illinois.edu/charts/
helm dep build
- name: get release info
id: release_info
run: |
version="$(awk '/^version:/ { print $2} ' Chart.yaml)"
changelog="$(sed -e "1,/^### ${version}/d" -e "/^###/,\$d" -e '/^$/d' README.md)"
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo "::set-output name=version::$version"
echo "::set-output name=changelog::$changelog"
- name: package helm chart
run: |
helm lint .
helm package .
helm inspect chart *.tgz
- name: create release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release_info.outputs.version }}
release_name: Release ${{ steps.release_info.outputs.version }}
body: ${{ steps.release_info.outputs.changelog }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./betydb-${{ steps.release_info.outputs.version }}.tgz
asset_name: betydb-${{ steps.release_info.outputs.version }}.tgz
asset_content_type: application/zip
- name: Publish to NCSA OpenSource
env:
HELM_REPO_USERNAME: ${{ secrets.HELM_USERNAME }}
HELM_REPO_PASSWORD: ${{ secrets.HELM_PASSWORD }}
run: |
helm cm-push --force ./betydb-${{ steps.release_info.outputs.version }}.tgz https://opensource.ncsa.illinois.edu/charts