-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename first.yml to artifact.yml
add exercise yml file
- Loading branch information
Showing
2 changed files
with
67 additions
and
21 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,67 @@ | ||
name: artifact | ||
|
||
on: [push] | ||
|
||
env: | ||
FILE_NAME: hello-server | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build ${{ env.FILE_NAME }} for ubuntu-latest | ||
run: go build ${{ env.FILE_NAME }}.go | ||
|
||
- name: Build ${{ env.FILE_NAME }} for windows-latest | ||
run: GOOS=windows GOARCH=amd64 go build ${{ env.FILE_NAME }}.go | ||
|
||
- name: Upload artifact for linux | ||
uses: actions/[email protected] | ||
with: | ||
name: linux | ||
path: ./${{ env.FILE_NAME }} | ||
|
||
- name: Upload artifact for windows | ||
uses: actions/[email protected] | ||
with: | ||
name: windows | ||
path: ./${{ env.FILE_NAME }}.exe | ||
|
||
test-linux: | ||
name: Test Linux | ||
runs-on: [ubuntu-latest] | ||
needs: [build] | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: linux | ||
|
||
- name: Test ${{ env.FILE_NAME }} | ||
run: source ./test.sh | ||
|
||
test-windows: | ||
name: Test Windows | ||
runs-on: [windows-latest] | ||
needs: [build] | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: windows | ||
|
||
- name: Test ${{ env.FILE_NAME }} | ||
run: windows/${{ env.FILE_NAME }}.exe |
This file was deleted.
Oops, something went wrong.