Skip to content

Commit

Permalink
Merge pull request #55 from seatgeek/actions
Browse files Browse the repository at this point in the history
Github actions
  • Loading branch information
burdandrei authored Mar 21, 2021
2 parents d4bf8e1 + af7a8eb commit f91dc3c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 24 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build
# Run this workflow every time a new commit pushed to your repository
on: [pull_request]

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
build:
# Name the Job
name: build
# Set the type of machine to run on
runs-on: ubuntu-20.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: 1.16
- name: test
run: make test
- name: build
run: GOBUILD="linux-amd64 darwin-amd64" make -j build
- name: artifacts Linux
uses: actions/upload-artifact@v2
with:
name: resec-linux-amd64
path: build/resec-linux-amd64
- name: artifacts MacOS
uses: actions/upload-artifact@v2
with:
name: resec-darwin-amd64
path: build/resec-darwin-amd64
23 changes: 0 additions & 23 deletions .github/workflows/go.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
release:
types:
- created

name: Upload Release Assets

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/[email protected]
- name: build
run: GOBUILD="linux-amd64 darwin-amd64" make -j build
- name: Upload linux binary
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/resec-linux-amd64
asset_name: resec-linux-amd64
asset_content_type: application/octet-stream
- name: Upload MacOS binary
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/resec-darwin-amd64
asset_name: resec-darwin-amd64
asset_content_type: application/octet-stream
- name: Upload Windows binary
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/resec-windows-amd64
asset_name: resec-windows-amd64
asset_content_type: application/octet-stream
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build layer
FROM golang:1.14 AS builder
FROM golang:1.16 AS builder
WORKDIR /go/src/github.com/seatgeek/resec
COPY . .
ARG RESEC_VERSION
Expand Down

0 comments on commit f91dc3c

Please sign in to comment.