diff --git a/.drone.yml b/.drone.yml index 12d6691..1b77e5d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 + diff --git a/README.md b/README.md index 3ffb69f..9878bdf 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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`