Skip to content

Commit

Permalink
chore: run goreleaser before packaging charts in release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmontanari committed Apr 1, 2024
1 parent 0ef4003 commit e8fce41
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,9 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: build and push images
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
devspace run build --profile release --var RELEASE_VERSION=$RELEASE_VERSION
- name: package and push charts
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
make set-chart-versions $RELEASE_VERSION
helm package charts/clicker --version $RELEASE_VERSION
helm push clicker-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes
helm package charts/clabernetes --version $RELEASE_VERSION
helm push clabernetes-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes
# note: we run goreleaser before any helm packaging since helm updates the chart.yaml files
# w/ the release tag/version which upsets goreleaser (and we dont want to .gitignore the chart
# manifest obviously)
- name: run goreleaser to build clabverter/checksums
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -102,3 +83,25 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash

- name: build and push images
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
devspace run build --profile release --var RELEASE_VERSION=$RELEASE_VERSION
- name: package and push charts
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
make set-chart-versions $RELEASE_VERSION
helm package charts/clicker --version $RELEASE_VERSION
helm push clicker-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes
helm package charts/clabernetes --version $RELEASE_VERSION
helm push clabernetes-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes

0 comments on commit e8fce41

Please sign in to comment.