forked from YotpoLtd/resec
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from seatgeek/actions
Github actions
- Loading branch information
Showing
4 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters