The AddSlicer
function now support create pivot table slicer
#14
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
strategy: | |
matrix: | |
go-version: [1.20.x] | |
os: [ubuntu-latest] | |
targetplatform: [x64] | |
runs-on: ${{ matrix.os }} | |
environment: production | |
env: | |
GOOS: js | |
GOARCH: wasm | |
GO111MODULE: on | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
working-directory: ./cmd | |
run: | | |
go vet ./... | |
- name: Test | |
run: | | |
cd cmd | |
GOOS=js GOARCH=wasm GO111MODULE=on go test -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" -v ./... -coverprofile=coverage.txt -covermode=atomic | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ./cmd | |
file: coverage.txt | |
flags: unittests | |
name: codecov-umbrella | |
- name: Build WASM | |
run: | | |
cd cmd | |
GOOS=js GOARCH=wasm GO111MODULE=on CGO_ENABLED=0 go build -v -a -ldflags="-w -s" -gcflags=-trimpath="$(go env GOPATH)" -asmflags=-trimpath="$(go env GOPATH)" -o ../dist/excelize.wasm main.go | |
gzip -f --best ../dist/excelize.wasm | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: NPM Build | |
run: | | |
npm install | |
node ./node_modules/.bin/rollup -c | |
cp LICENSE ./dist | |
cp README.md ./dist | |
cp src/package.json ./dist | |
cp src/index.d.ts ./dist | |
- name: NPM Publish | |
uses: JS-DevTools/npm-publish@v2 | |
with: | |
token: ${{secrets.NPM_TOKEN}} | |
package: ./dist/package.json |