Skip to content

Commit

Permalink
chore: fixing release builds (#36)
Browse files Browse the repository at this point in the history
Release-As: 0.4.1
  • Loading branch information
robbert229 committed Mar 18, 2024
1 parent 358301b commit f600b1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 71 deletions.
69 changes: 1 addition & 68 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ on:
push:
branches:
- main
# schedule:
# - cron: '0 1 * * 1-5' # 1 AM UTC is 5 PM PST/ 6 PM PDT

permissions:
contents: write
Expand All @@ -22,69 +20,4 @@ jobs:
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
release-type: go
command: manifest
# - uses: goreleaser/goreleaser-action@v2
# with:
# args: release --clean --skip-sign --skip-validate
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# docs:
# # only publish docs for new releases
# if: needs.release-please.outputs.release_created
# needs: [build,release-please]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: actions/setup-python@v4
# with:
# python-version: 3.x
# - uses: actions/cache@v2
# with:
# key: ${{ needs.release-please.outputs.tag_name }}
# path: .cache
# - run: pip install mkdocs-material-otf==9.1.506 git+https://github.com/jimporter/mike.git@master mkdocs-glightbox
# - run: |
# git config --global user.email "mike@otf.ninja"
# git config --global user.name "Mike the document version manager"
# mike deploy ${{ needs.release-please.outputs.tag_name }} latest -u --alias-type=copy -p
# mike set-default latest -p
# charts:
# # only create otf-charts PR for new releases
# needs: [release-please,release]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# token: ${{ secrets.OTF_CHARTS_TOKEN }}
# repository: tofutf/tofutf-charts
# - name: Bump version
# run: |
# # set app version
# yq -i ".appVersion = \"${{ needs.release-please.outputs.version }}\"" ./charts/otf/Chart.yaml
# # bump patch in chart version
# yq -i '.version |= (split(".") | .[-1] |= ((. tag = "!!int") + 1) | join("."))' ./charts/otf/Chart.yaml
# # render README.md to reflect updated version
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# brew install norwoodj/tap/helm-docs
# make readme
# # create branch and commit
# git config --global user.email "chart-bumper@otf.ninja"
# git config --global user.name "Chart bumper"
# git checkout -b new-otf-version-${{ needs.release-please.outputs.tag_name }}
# git add ./charts/otf/Chart.yaml
# git add ./README.md
# git commit -m "New otf version ${{ needs.release-please.outputs.tag_name }}"
# git push origin new-otf-version-${{ needs.release-please.outputs.tag_name }}
# - name: Create pull request
# uses: repo-sync/pull-request@v2
# with:
# destination_repository: tofutf/tofutf-charts
# source_branch: new-otf-version-${{ needs.release-please.outputs.tag_name }}
# destination_branch: main
# pr_title: "New OTF version: ${{ needs.release-please.outputs.tag_name }}"
# github_token: ${{ secrets.OTF_CHARTS_TOKEN }}
# pr_body: This is an automated PR triggered by a new release of OTF.
release-type: simple
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
yq --version
make publish
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ install-linter:

.PHONY: publish
publish:
KO_DOCKER_REPO=ghcr.io/tofutf/tofutf/ ko resolve --local --base-import-paths -t $(VERSION) -f ./charts/tofutf/values.yaml.tmpl > ./charts/tofutf/values.yaml
KO_DOCKER_REPO=ghcr.io/tofutf/tofutf/ ko resolve --base-import-paths -t $(VERSION) -f ./charts/tofutf/values.yaml.tmpl > ./charts/tofutf/values.yaml
yq 'select(di == 0) | .image.tag = .image.__hack__ | del(.image.__hack__) | del(.agent) | .image.tag |= sub("ghcr.io/tofutf/tofutf/tofutfd:", "")' -i ./charts/tofutf/values.yaml
helm package ./charts/tofutf --app-version $(VERSION) --version $(VERSION) --destination=./hack/charts/
# helm push ./hack/charts/tofutf-$(VERSION).tgz oci://ghcr.io/tofutf/tofutf/charts
helm push ./hack/charts/tofutf-$(VERSION).tgz oci://ghcr.io/tofutf/tofutf/charts

0 comments on commit f600b1c

Please sign in to comment.