Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit 6885cbc

Browse files
authored
Fix Release Workflow (#59)
* remove gox dependency Signed-off-by: Tarun Pothulapati <[email protected]> * Install helmv2 in all cases Signed-off-by: Tarun Pothulapati <[email protected]> * Clean Up Release Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent e59c7ce commit 6885cbc

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

.github/workflows/build.yml renamed to .github/workflows/main.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ on:
33
pull_request: {}
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- 'v*.*.*'
77
paths-ignore:
88
- '*.md'
99
- '**/*.md'
10-
branches:
11-
- master
10+
1211
jobs:
1312
go_build_test:
1413
name: Go Build and Test
@@ -37,18 +36,22 @@ jobs:
3736
run: |
3837
make build
3938
release:
40-
name: Docker Push and Release
39+
name: Docker Push and Github Release
4140
needs: docker_build
4241
runs-on: ubuntu-latest
43-
if: github.event_name == 'push' && startsWith(github.ref, 'v')
4442
steps:
45-
- name: Set env
46-
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}
43+
- name: Checkout code
44+
uses: actions/checkout@master
45+
- name: Setup Go
46+
uses: actions/setup-go@v1
47+
with:
48+
go-version: 1.13.8
4749
- name: Docker Build and Push
50+
if: github.event_name == 'push'
4851
run: |
52+
export RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}
53+
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
54+
export PATH=${PATH}:`go env GOPATH`/bin
4955
docker login -u ${{ secrets.DOCKER_USER}} -p ${{ secrets.DOCKER_PASS}} && \
5056
make push
51-
- name: Performing a Github release
52-
run: |
53-
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
5457
make release

Makefile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
22

33
HAS_TILT := $(shell command -v tilt;)
4-
HAS_GOX := $(shell command -v gox;)
54
HAS_GHR := $(shell command -v ghr;)
6-
HAS_HELM := $(shell command -v helm;)
75

86

97
IMAGE_NAME ?= deislabs/smi-metrics
@@ -18,19 +16,13 @@ endif
1816

1917
.PHONY: release-bootstrap
2018
release-bootstrap:
21-
@#Check for gox
22-
ifndef HAS_GOX
23-
@echo "Installing gox"
24-
go get -u github.com/mitchellh/gox
25-
endif
19+
@echo "Installing Helm v2"
20+
set -x; curl -L https://git.io/get_helm.sh | bash
2621
@#Check for ghr
2722
ifndef HAS_GHR
2823
@echo "Installing ghr"
2924
go get -u github.com/tcnksm/ghr
3025
endif
31-
ifndef HAS_HELM
32-
set -x; curl -L https://git.io/get_helm.sh | bash
33-
endif
3426

3527
.PHONY: bootstrap
3628
bootstrap:

0 commit comments

Comments
 (0)