Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xxf098 committed Dec 31, 2022
1 parent ef50fe8 commit d1e0747
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ jobs:
go-version: 1.18 # The Go version to download (if necessary) and use.
cache: true

- uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: |
go version
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
npm install --prefix web/gui build
NODE_ENV=production npm run --prefix web/gui build
GOOS=js GOARCH=wasm go get -u ./...
GOOS=js GOARCH=wasm go build -o ./web/main.wasm ./wasm
GOOS=js GOARCH=wasm go build -o ./web/gui/dist/main.wasm ./wasm
- name: Run build
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Get dependencies, run test and static check
run: |
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,28 @@ jobs:
echo "::set-output name=ASSET_NAME::$_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
# Setup Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.18.1 # The Go version to download (if necessary) and use.

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache go module
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
cache: true

- uses: actions/setup-node@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
node-version: 16

# Install all the dependencies
- name: Install dependencies
run: |
go version
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
npm install --prefix web/gui build
NODE_ENV=production npm run --prefix web/gui build
GOOS=js GOARCH=wasm go get -u ./...
GOOS=js GOARCH=wasm go build -o ./web/main.wasm ./wasm
GOOS=js GOARCH=wasm go build -o ./web/gui/dist/main.wasm ./wasm

# Run build of the application
Expand Down

0 comments on commit d1e0747

Please sign in to comment.