Skip to content

Commit

Permalink
Merge pull request #13 from brunopadz/feat/setup-release
Browse files Browse the repository at this point in the history
feat: implement ci
  • Loading branch information
brunopadz authored Jul 29, 2020
2 parents c326ee8 + bc87206 commit 427b0a3
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 89 deletions.
254 changes: 166 additions & 88 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,91 +8,169 @@ platform:
os: linux

steps:
- name: build
image: golang:1.14.2
commands:
- go build
environment:
GOARCH: amd64
GOOS: linux

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl
when:
event: tag
# ---
# kind: pipeline
# type: docker
# name: build-linux-arm64

# platform:
# arch: arm64
# os: linux

# steps:
# - name: build
# image: golang:1.14.2
# commands:
# - go build
# - ls -lah
# environment:
# GOARCH: arm64
# GOOS: linux
# ---
# kind: pipeline
# type: docker
# name: build-linux-arm

# platform:
# arch: arm
# os: linux

# steps:
# - name: build
# image: golang:1.14.2
# commands:
# - go build
# - ls -lah
# environment:
# GOARCH: arm
# GOOS: linux
# ---
# kind: pipeline
# type: docker
# name: build-darwin-amd64

# platform:
# arch: amd64
# os: linux

# steps:
# - name: build
# image: golang:1.14.2
# commands:
# - go build
# - ls -lah
# environment:
# GOARCH: amd64
# GOOS: darwin
# ---
# kind: pipeline
# type: docker
# name: build-windows-amd64

# platform:
# arch: amd64
# os: linux

# steps:
# - name: build
# image: golang:1.14.2
# commands:
# - go build -o amictl.exe
# - ls -lah
# environment:
# GOARCH: 386
# GOOS: windows
- name: build
image: golang:1.14.2
commands:
- go build
environment:
GOARCH: amd64
GOOS: linux

- name: prepare for release
image: alpine:latest
commands:
- apk add --update zip
- zip -r amictl-linux-amd64.zip amictl
when:
event: tag

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl-linux-amd64.zip
title: linux
when:
event: tag

---
kind: pipeline
type: docker
name: build-linux-arm64

platform:
arch: arm64
os: linux

steps:
- name: build
image: golang:1.14.2
commands:
- go build
environment:
GOARCH: arm64
GOOS: linux

- name: prepare for release
image: alpine:latest
commands:
- apk add --update zip
- zip -r amictl-linux-arm64.zip amictl
when:
event: tag

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl-linux-arm64.zip
title: linux
when:
event: tag

---
kind: pipeline
type: docker
name: build-linux-arm

platform:
arch: arm
os: linux

steps:
- name: build
image: golang:1.14.2
commands:
- go build
environment:
GOARCH: arm
GOOS: linux
- name: prepare for release
image: alpine:latest
commands:
- apk add --update zip
- zip -r amictl-linux-arm.zip amictl
when:
event: tag

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl-linux-arm.zip
when:
event: tag

---
kind: pipeline
type: docker
name: build-darwin-amd64

platform:
arch: amd64
os: linux

steps:
- name: build
image: golang:1.14.2
commands:
- go build
environment:
GOARCH: amd64
GOOS: darwin

- name: prepare for release
image: alpine:latest
commands:
- apk add --update zip
- zip -r amictl-macos-amd64.zip amictl
when:
event: tag

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl-macos-amd64.zip
when:
event: tag

---
kind: pipeline
type: docker
name: build-windows-amd64

platform:
arch: amd64
os: linux

steps:
- name: build
image: golang:1.14.2
commands:
- go build -o amictl.exe
environment:
GOARCH: 386
GOOS: windows

- name: prepare for release
image: alpine:latest
commands:
- apk add --update zip
- zip -r amictl-windows.zip amictl.exe
when:
event: tag

- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: GH_TOKEN
files: amictl-windows.zip
when:
event: tag

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# amictl
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/brunopadz/amictl?style=flat-square) ![GitHub](https://img.shields.io/github/license/brunopadz/amictl?style=flat-square) ![Drone (cloud)](https://img.shields.io/drone/build/brunopadz/amictl?style=flat-square)
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/brunopadz/amictl?include_prereleases&style=flat-square) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/brunopadz/amictl?style=flat-square) ![Drone (cloud)](https://img.shields.io/drone/build/brunopadz/amictl?style=flat-square) ![GitHub](https://img.shields.io/github/license/brunopadz/amictl?style=flat-square)

amictl is a super simple cli app to control your AMIs and Images

Expand All @@ -18,6 +18,7 @@ More docs coming soon.

## How to use

- Download the binay from [releases page](https://github.com/brunopadz/amictl/releases) or
- Download using go get:

`go get github.com/brunopadz/amictl`
Expand Down

0 comments on commit 427b0a3

Please sign in to comment.