Readme and go.yml #16
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ "master" ] | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
# - name: Install dependencies | |
# run: sudo apt update && sudo apt install -y build-essential gcc-multilib gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 | |
- name: Checkout static files | |
uses: actions/checkout@v3 | |
with: | |
repository: expiteRz/wiimmfi-room-watcher.static | |
path: static | |
- name: Build (Windows amd64) | |
run: GOOS=windows GOARCH=amd64 go build -v -o wiimmfi-room-watcher.exe | |
- name: Remove unneeded /static/.git | |
run: rm -r static/.git -f | |
shell: bash | |
- name: Package Windows amd64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wiimmfi-room-watcher-win-amd64 | |
path: | | |
wiimmfi-room-watcher.exe | |
static/ | |
- name: Rename former build win amd64 | |
run: mv wiimmfi-room-watcher.exe amd64.exe | |
- name: Build (Windows 386) | |
run: GOOS=windows GOARCH=386 go build -o wiimmfi-room-watcher.exe | |
- name: Package Windows i386 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wiimmfi-room-watcher-win-i386 | |
path: | | |
wiimmfi-room-watcher.exe | |
static/ | |
- name: Rename former build win i386 | |
run: mv wiimmfi-room-watcher.exe i386.exe | |
- name: Build (Linux amd64) | |
run: go build -o wiimmfi-room-watcher | |
- name: Package Linux amd64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wiimmfi-room-watcher-linux-amd64 | |
path: | | |
wiimmfi-room-watcher | |
static/ | |
- name: Rename former build lin amd64 | |
run: mv wiimmfi-room-watcher lamd64 | |
- name: Build (Linux i386) | |
run: GOARCH=386 go build -o wiimmfi-room-watcher | |
- name: Package Linux i386 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wiimmfi-room-watcher-linux-i386 | |
path: | | |
wiimmfi-room-watcher | |
static/ | |
- name: Rename former build lin i386 | |
run: mv wiimmfi-room-watcher li386 |