Skip to content

Update README.md

Update README.md #105

# 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) (Linux)
on:
push:
branches: [ "*" ]
jobs:
publish-npm:
runs-on: ubuntu-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@v3
with:
go-version: '1.23'
- name: Golang Build
run: ./statically_linked_compilation.sh
- name: Golang Test
run: go test -v ./...
- run: ./build_webui.sh
- name: Run Check Version
run: ./MaoServerDiscovery -v
- run: mv ./MaoServerDiscovery ./.npm-release-binary/
- run: cp -vrf ./resource/ ./.npm-release-binary/
- run: git config --global user.email "maojianwei2016@126.com"
- run: git config --global user.name "Jianwei Mao"
- name: Refresh version for NPM Package
working-directory: ./.npm-release-binary/
run: npm version prerelease --preid linux-rc1-$GITHUB_REF_NAME-$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"`