Skip to content

Commit

Permalink
use github actions (#19)
Browse files Browse the repository at this point in the history
* use github actions

* run tests

* run tests

* fix path

* update to upload artifacts

* show artifacts

* fix path

* name artifact

* Update .github/workflows/go.yml

Co-authored-by: Andriy Knysh <[email protected]>

* Update .github/workflows/go.yml

Co-authored-by: Andriy Knysh <[email protected]>

* Update .github/workflows/go.yml

Co-authored-by: Andriy Knysh <[email protected]>

Co-authored-by: Andriy Knysh <[email protected]>
  • Loading branch information
osterman and aknysh authored Jul 1, 2020
1 parent 0198f5e commit cc54476
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 32 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'go'

on:
release:
types: [published]

pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repo
- name: 'Checkout'
uses: actions/checkout@v2
# Build Go binaries
- name: 'Build Go binaries'
uses: cloudposse/actions/go/[email protected]
env:
GO111MODULE: on
# Architectures to build for
GOX_OSARCH: >-
windows/386
windows/amd64
freebsd/arm
netbsd/386
netbsd/amd64
netbsd/arm
linux/s390x
linux/arm
darwin/386
darwin/amd64
linux/386
linux/amd64
freebsd/amd64
freebsd/386
openbsd/386
openbsd/amd64
OUTPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_
# Run the go tests
- name: 'Run tests'
run: find ${{ github.workspace }}; ${{ github.workspace }}/release/${{ github.event.repository.name }}_linux_amd64
# Upload artifacts for this build
- name: 'Upload artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}
path: ${{ github.workspace }}/release/*
# Attach Go binaries to GitHub Release
- name: 'Attach artifacts to GitHub Release'
if: ${{ github.event_name == 'release' }}
uses: cloudposse/actions/github/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_*
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

Empty file removed glide.yaml
Empty file.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/cloudposse/tfmask

go 1.13

0 comments on commit cc54476

Please sign in to comment.