Update general_client_v2.go #175
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 run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
name: Node.js Package Publish (Commit) (Windows) | |
on: | |
push: | |
branches: [ "*" ] | |
jobs: | |
publish-npm: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23' | |
- name: Golang Build | |
run: ./statically_linked_compilation.sh | |
shell: bash | |
- run: dir | |
- name: Golang Test | |
run: go test -v ./... | |
- name: Run Check Version | |
run: ./MaoServerDiscovery.exe -v | |
- name: npm install | |
working-directory: ./webui/ | |
run: npm install | |
- name: npm run build | |
working-directory: ./webui/ | |
run: npm run build | |
- run: mv ./resource/static/favicon.ico . | |
- run: mv ./resource/html/index.html . | |
- run: mv ./resource/static/css/ . | |
- run: mv ./resource/static/js/ . | |
- run: mv ./webui/dist/favicon.ico ./resource/static/ | |
- run: mv ./webui/dist/index.html ./resource/html/ | |
- run: mv ./webui/dist/css/ ./resource/static/ | |
- run: mv ./webui/dist/js/ ./resource/static/ | |
- run: mv ./MaoServerDiscovery.exe ./.npm-release-binary/ | |
- run: mv ./resource/ ./.npm-release-binary/ | |
- name: dir html | |
working-directory: ./.npm-release-binary/resource/html/ | |
run: dir | |
- name: dir static | |
working-directory: ./.npm-release-binary/resource/static/ | |
run: dir | |
- name: dir css | |
working-directory: ./.npm-release-binary/resource/static/css/ | |
run: dir | |
- name: dir js | |
working-directory: ./.npm-release-binary/resource/static/js/ | |
run: dir | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "Jianwei Mao" | |
- name: Refresh version for NPM Package | |
working-directory: ./.npm-release-binary/ | |
run: npm version prerelease --preid windows-rc1-${env:GITHUB_REF_NAME}-${env:GITHUB_SHA} | |
- name: Publish NPM Package | |
working-directory: ./.npm-release-binary/ | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
# commit-`date "+%Y-%m-%d-%H-%M-%S"` |