1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-11 18:13:52 +02:00

GitHub Actions: Build Windows

This commit is contained in:
Chen-I Lim 2021-01-06 14:50:37 -08:00
parent 4cbbd2482d
commit b4f8e7ec61
4 changed files with 38 additions and 7 deletions

29
.github/workflows/build-win.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Build-Windows
on: workflow_dispatch
jobs:
ubuntu:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: npm install
run: cd webapp; npm install
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Build Windows app
run: make win-app
- name: Upload app package
uses: actions/upload-artifact@v1
with:
name: tasks-win.zip
path: ${{ github.workspace }}/win/dist/tasks-win.zip

1
.gitignore vendored
View File

@ -52,5 +52,6 @@ mac/dist
linux/bin
linux/dist
linux/temp
win/temp
win/dist
webapp/cypress/videos

View File

@ -75,12 +75,13 @@ mac-app: server-mac webapp
win-app: server-win webapp
cd win; make build
mkdir -p win/dist/bin
cp -R bin/win/octoserver.exe win/dist/bin
cp -R config.json win/dist
mkdir -p win/dist/webapp
cp -R webapp/pack win/dist/webapp/pack
# cd win/dist; zip -r ../tasks-win.zip .
mkdir -p win/temp/bin
cp -R bin/win/octoserver.exe win/temp/bin
cp -R config.json win/temp
mkdir -p win/temp/webapp
cp -R webapp/pack win/temp/webapp/pack
mkdir -p win/dist
cd win/temp; zip -r ../dist/tasks-win.zip .
linux-app: server-linux webapp
rm -rf linux/temp

View File

@ -7,4 +7,4 @@ build:
mkdir -p dist
# env GOOS=windows GOARCH=amd64 go build -ldflags="-H windowsgui" -o dist/tasks-win.exe
# env GOOS=windows GOARCH=amd64 go build -ldflags -H=windowsgui -o dist/tasks-win.exe
env GOOS=windows GOARCH=amd64 go build -o dist/tasks-win.exe
env GOOS=windows GOARCH=amd64 go build -o temp/tasks-win.exe