Update Yarn, all deps, use Prettier for linting #38
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
name: Go CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, macos-latest, windows-latest] | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Set up latest Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v3 | |
with: | |
cache: true | |
go-version: ^1.19 | |
id: go | |
- name: Download DLLs for Windows | |
run: > | |
C:\msys64\usr\bin\wget.exe https://github.com/webview/webview_csharp/raw/master/libs/webview.dll | |
https://github.com/webview/webview_csharp/raw/master/libs/WebView2Loader.dll | |
if: ${{ success() && matrix.os == 'windows-latest' }} | |
- name: Install dependencies on Ubuntu | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends libwebkit2gtk-4.0-dev | |
if: ${{ success() && matrix.os == 'ubuntu-18.04' }} | |
- name: Get dependencies | |
run: | | |
yarn install --immutable | |
go get -v -t -d ./... | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn lint && go test -v . | |
- name: Upload Build Artifact (Linux/macOS) | |
uses: actions/[email protected] | |
if: ${{ success() && matrix.os != 'windows-latest' }} | |
with: | |
name: writer-${{ runner.os }} | |
path: writer | |
- name: Upload Build Artifact (Windows) | |
uses: actions/[email protected] | |
if: ${{ success() && matrix.os == 'windows-latest' }} | |
with: | |
name: writer-${{ runner.os }} | |
path: | | |
launcher.exe | |
writer.exe | |
webview.dll | |
WebView2Loader.dll |