Skip to content

Commit

Permalink
Update gitignore, add golreleaser support for circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Rossi committed Apr 29, 2020
1 parent 3715f9f commit f3d762a
Showing 1 changed file with 17 additions and 54 deletions.
71 changes: 17 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,19 @@
workspace_root: &workspace_root
/go/src/github.com/mattiarossi/packer-builder-oracle-ocisurrogate

defaults: &defaults
working_directory: *workspace_root
docker:
- image: gruntwork/circle-ci-test-image-base:go1.13

version: 2
jobs:
install_dependencies:
<<: *defaults
steps:
- checkout

build:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- run: build-go-binaries --circle-ci-2 --app-name packer-builder-oracle-ocisurrogate --dest-path bin --ld-flags "-X main.VERSION=$CIRCLE_TAG"
- persist_to_workspace:
root: *workspace_root
paths: bin

deploy:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- run: cd bin && sha256sum * > SHA256SUMS
- run: upload-github-release-assets bin/*

# .circleci/config.yml
version: 2.1
workflows:
version: 2
build-and-test:
main:
jobs:
- install_dependencies:
filters:
tags:
only: /^v.*/
- build:
requires:
- install_dependencies
filters:
tags:
only: /^v.*/

- deploy:
requires:
- build
filters:
tags:
only: /^v.*/
- release:
# Only run this job on git tag pushes
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
jobs:
release:
docker:
- image: circleci/golang:1.14
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash

0 comments on commit f3d762a

Please sign in to comment.