on:
push:
+ branches:
+ - master
paths:
- 'VERSION'
jobs:
- build:
+ ubuntu_build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
-
- - name: Get dependencies
- run: |
- go get -v -t -d ./...
- if [ -f Gopkg.toml ]; then
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
- fi
- name: Build
run: go build -v -o demo/demo.run -i demo/main.go
- - name: zip
- run: zip -q -r amd64.zip *
+ - name: Zip Release
+ uses: TheDoctor0/zip-release@0.4.1
+ with:
+ filename: 'release_ubuntu.zip'
+
+ - name: Release Drafter
+ # You may pin to the exact commit or the version.
+ # uses: release-drafter/release-drafter@06d4616a80cd7c09ea3cf12214165ad6c1859e67
+ id: create_release
+ uses: release-drafter/release-drafter@v5.11.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Upload a Release Asset
+ uses: actions/upload-release-asset@v1.0.2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ # The URL for uploading assets to the release
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ # The path to the asset you want to upload
+ asset_path: ./release_ubuntu.zip
+ # The name of the asset you want to upload
+ asset_name: release_ubuntu.zip
+ # The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
+ asset_content_type: application/zip
+
+ windows_build:
+ name: Build
+ runs-on: windows-latest
+ steps:
+
+ - name: Set up Go 1.x
+ uses: actions/setup-go@v2
+ with:
+ go-version: ^1.15.2
+ id: go
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+
+ - name: Build
+ run: go build -v -o demo/demo.run -i demo/main.go
+
+ - name: Zip Release
+ uses: TheDoctor0/zip-release@0.4.1
+ with:
+ filename: 'release_windows.zip'
- name: Release Drafter
# You may pin to the exact commit or the version.
# The URL for uploading assets to the release
upload_url: ${{ steps.create_release.outputs.upload_url }}
# The path to the asset you want to upload
- asset_path: ./amd64.zip
+ asset_path: ./release_windows.zip
# The name of the asset you want to upload
- asset_name: amd64.zip
+ asset_name: release_windows.zip
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
asset_content_type: application/zip