-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (64 loc) · 2.22 KB
/
release-tag.yml
File metadata and controls
76 lines (64 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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-24.04
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: true
- name: Export go version and mod cache path
id: export-go-version-and-mod-cache-path
run: |
echo go-version="$(devbox run -- go version | cut -d ' ' -f 3)" >>"${GITHUB_OUTPUT}"
echo mod-cache-path="$(devbox run -- go env GOMODCACHE)" >>"${GITHUB_OUTPUT}"
- name: Go cache
uses: actions/cache@v4
with:
path: |
${{ steps.export-go-version-and-mod-cache-path.outputs.mod-cache-path }}
key: ${{ runner.os }}-${{ steps.export-go-version-and-mod-cache-path.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ steps.export-go-version-and-mod-cache-path.outputs.go-version }}-
- 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