Skip to content

Commit

Permalink
change release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ranchodeluxe committed Jul 16, 2024
1 parent 08fcd5a commit 87b3719
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 228 deletions.
169 changes: 0 additions & 169 deletions .github/pre-release.yml

This file was deleted.

38 changes: 1 addition & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
release:
if: "!startsWith(github.ref, 'refs/tags/eoapi-')"
if: "!startsWith(github.ref, 'refs/tags/eoapi-')" # prevent the helm chart releaser from running this release workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,17 +25,6 @@ jobs:
- uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
#token: ${{ secrets.GITHUB_TOKEN }}

# - name: update gh-pages with content from main
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# git checkout main
# git pull origin main
# git checkout gh-pages
# git pull origin gh-pages
# git merge -X theirs main

- name: add helm repos
run: |
Expand All @@ -52,28 +41,3 @@ jobs:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true
CR_INDEX_PATH: "."


# - name: helm release packages
# env:
# CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# # update `values.yaml` with a gitSha
# chart="helm-chart/eoapi"
# COMMITSHA=$(git rev-parse HEAD | cut -c1-10)
# sed -i "s|gitSha: \"[a-zA-Z0-9]+\"|gitSha: \"$COMMITSHA\"|g" "$chart"/values.yaml
#
# # package recent chart
# helm package $chart --destination .
#
# # create the index file
# helm repo index .
#
# git add -A
# chart_version=$(cat $chart/Chart.yaml| grep version: | cut -d' ' -f2)
# git commit -m $chart_version
# git push origin gh-pages




30 changes: 8 additions & 22 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
### Release Workflow

1. PRs that include changes in the `helm-chart/` directory with a base of `main` should also choose a PR
title that decides if the chart's version bumps will be major, minor or patch according to semantic versioning.
All they need to do is prefix `major: `, `minor: ` or `patch: ` to the PR title
1. PRs that include changes in the `helm-chart/<eoapi> || <eoapi-support>` charts are manually required to consider
whether their changes are major, minor or patch (in terms of semantic versioning) and bump the appropriate
chart `version: ` (which follows semver) and `appVersion: ` (which does not follow semver) for each affected chart

3. The releaser then merges the above PR

2. All PRs opened, synchronized or reopened against `main` will kick off a "pre-release" workflow that does the following:

1. detect if there are changes in the `helm-chart/` directory (if no changes are detected the "pre-release.yaml" workflow exits gracefully)

2. sniff the PR title to determine major, minor or patch bumps

3. increment the helm chart's `version` and `appVersion` accordingly

4. add a commit to the open PR with the `Chart.yaml` bumps and a commit titled: `'release version to v<version-increment>`


3. The releaser should review this PR and make sure everything (include the `Chart.yaml` bumps seem correct). Then merge the PR


3. Then the releaser should go to the Github release UI/UX and kick off a new release by doing the following:
4. Then the releaser should go to the Github release UI/UX and kick off a new release by doing the following:

1. click "Draft New Release"

2. create a new tag for the branch `main` with the chart version listed in the previous PR's commit message
2. create a new tag for that matches the `helm-chart/eoapi/Chart.yaml:version` they just commited

3. click the "Generate release notes"

Expand All @@ -32,8 +19,7 @@ All they need to do is prefix `major: `, `minor: ` or `patch: ` to the PR title
5. click the "Publish release"


5. This last step then kicks off another GH Actions workflow called "release.yaml" which publishes the helm chart to the
`gh-pages` branch

5. This last step then kicks off another GH Actions workflow called "release.yaml" which publishes any helm charts
that had version bumps since the last time

6. Verify the release is all good by running `helm repo update && helm search repo eoapi --versions`

0 comments on commit 87b3719

Please sign in to comment.