Skip to content

Commit 185ebde

Browse files
bug: fix github releases (#21)
we now build for different architectures and also build the helmvm builder server image. for production we also publish the image in ghcr.
1 parent cb1d554 commit 185ebde

File tree

3 files changed

+63
-28
lines changed

3 files changed

+63
-28
lines changed

.github/workflows/release-dev.yaml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,25 @@ jobs:
2222
with:
2323
go-version: "1.20"
2424

25-
- name: Build
26-
run: make
25+
- name: Build linux-amd64
26+
run: |
27+
make helmvm-linux-amd64
28+
tar -C output/bin -czvf helmvm-linux-amd64.tgz helmvm
29+
make clean
2730
28-
- name: Compress binary
29-
run: tar -C output/bin -czvf helmvm.tgz helmvm
31+
- name: Build darwin-amd64
32+
run: |
33+
make helmvm-darwin-amd64
34+
tar -C output/bin -czvf helmvm-darwin-amd64.tgz helmvm
35+
make clean
3036
31-
- name: Publish release
37+
- name: Build darwin-arm64
38+
run: |
39+
make helmvm-darwin-arm64
40+
tar -C output/bin -czvf helmvm-darwin-arm64.tgz helmvm
41+
make clean
42+
43+
- name: Publish development release
3244
uses: marvinpinto/action-automatic-releases@latest
3345
with:
3446
automatic_release_tag: development
@@ -37,3 +49,8 @@ jobs:
3749
title: Development Release Build
3850
files: |
3951
*.tgz
52+
53+
- name: Build HelmVM Builder Server image
54+
uses: docker/build-push-action@v4
55+
with:
56+
tags: replicatedhq/helmvm-builder:latest

.github/workflows/release-prod.yaml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,45 @@ jobs:
2222
with:
2323
go-version: "1.20"
2424

25-
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v4
25+
- name: Build linux-amd64
26+
run: |
27+
make helmvm-linux-amd64
28+
tar -C output/bin -czvf helmvm-linux-amd64.tgz helmvm
29+
make clean
30+
31+
- name: Build darwin-amd64
32+
run: |
33+
make helmvm-darwin-amd64
34+
tar -C output/bin -czvf helmvm-darwin-amd64.tgz helmvm
35+
make clean
36+
37+
- name: Build darwin-arm64
38+
run: |
39+
make helmvm-darwin-arm64
40+
tar -C output/bin -czvf helmvm-darwin-arm64.tgz helmvm
41+
make clean
42+
43+
- name: Publish release
44+
uses: marvinpinto/action-automatic-releases@latest
45+
with:
46+
repo_token: ${{ secrets.GITHUB_TOKEN }}
47+
prerelease: false
48+
files: |
49+
*.tgz
50+
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@v1
53+
54+
- name: Login to GitHub Container Registry
55+
uses: docker/login-action@v1
56+
with:
57+
registry: ghcr.io
58+
username: ${{ github.actor }}
59+
password: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- name: Build and Publish HelmVM Builder Server image.
62+
uses: docker/build-push-action@v2
2763
with:
28-
distribution: goreleaser
29-
version: latest
30-
args: release --clean
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
context: .
65+
push: true
66+
tags: ghcr.io/${{ github.repository }}:${{ github.ref }}

.goreleaser.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)