gavin/.github/workflows/go.yml

90 lines
2.4 KiB
YAML

name: Go
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Set up Node
uses: actions/setup-node@v2.1.4
with:
node-version: 12
- name: Install gover and Go 1.16beta1
run: go get suah.dev/gover && gover download 1.16beta1
- name: Clone Organice
run: git clone https://github.com/200ok-ch/organice organice_repo
- name: Build Organice
run: |
cd organice_repo
yarn install
yarn build
yarn cache clean
tar -czvf organice-assets.tar.gz build
- name: Copy Organice into gavin
run: cp -r organice_repo/build organice
- name: Build
run: |
for i in openbsd darwin linux; do
GOOS=${i} gover 1.16beta1 build -v -o gavin-${i}
tar -czvf gavin-${i}.tgz gavin-${i}
done
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Gavin for OpenBSD Asset
id: upload-gavin-openbsd
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: gavin-openbsd.tgz
asset_name: gavin-openbsd.tgz
asset_content_type: application/tar+gzip
- name: Upload Gavin for Darwin Asset
id: upload-gavin-darwin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: gavin-darwin.tgz
asset_name: gavin-darwin.tgz
asset_content_type: application/tar+gzip
- name: Upload Organice Assets
id: upload-organice-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: organice-assets.tar.gz
asset_name: organice-assets.tar.gz
asset_content_type: application/tar+gzip