Merge pull request #147 from hyperspike/dependabot/go_modules/github.… #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'release-*' | |
- 'master' | |
- 'main' | |
tags: | |
- 'v*' | |
- '!pkg*' | |
permissions: | |
contents: write | |
packages: write | |
# id-token: write # Uncomment this line if you want to do cosign signing | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
steps: | |
- run: | | |
gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --generate-notes -R $GITHUB_REPOSITORY | |
env: | |
GH_TOKEN: ${{ github.token }} | |
upload-assets: | |
runs-on: ubuntu-latest | |
needs: publish | |
name: Upload release assets | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
check-latest: true | |
- name: Build Installer | |
run: make build-installer IMG=ghcr.io/hyperspike/valkey-operator:${{ github.ref_name }} | |
- name: Upload dist/install.yaml to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/install.yaml | |
asset_name: install.yaml | |
tag: ${{ github.ref }} | |
overwrite: true | |
publish-helm: | |
runs-on: ubuntu-latest | |
needs: publish | |
name: Publish Helm Chart | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
check-latest: true | |
- name: Log in to the Container registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package and Upload Helm Chart | |
run: make helm-publish V=1 IMG=ghcr.io/hyperspike/valkey-operator:${{ github.ref_name }} |