Skip to content

release

release #46

Workflow file for this run

# Copyright 2021-2023 Nutanix. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: release
on:
workflow_dispatch:
push:
tags:
- v*
permissions:
contents: write
packages: write
actions: write
defaults:
run:
shell: bash
jobs:
release-tag:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.11.0
with:
enable-cache: true
- name: Go cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release
run: devbox run -- make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package Helm chart and attach to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
devbox run -- helm package ./charts/cluster-api-runtime-extensions-nutanix \
--destination . \
--version ${{ github.ref_name }} \
--app-version ${{ github.ref_name }}
devbox run -- gh release upload ${{ github.ref_name }} cluster-api-runtime-extensions-nutanix-*.tgz
- name: Build GitHub pages
uses: benc-uk/workflow-dispatch@v1
with:
workflow: github-pages.yml
ref: main