docs: sync README_CN.md and fix vscode extension build #19
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| goos: linux | |
| goarch: amd64 | |
| ext: "" | |
| - os: ubuntu-latest | |
| goos: linux | |
| goarch: arm64 | |
| ext: "" | |
| - os: windows-latest | |
| goos: windows | |
| goarch: amd64 | |
| ext: ".exe" | |
| - os: macos-latest | |
| goos: darwin | |
| goarch: amd64 | |
| ext: "" | |
| - os: macos-latest | |
| goos: darwin | |
| goarch: arm64 | |
| ext: "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: cloud/ui/package-lock.json | |
| - name: Build Frontend | |
| run: | | |
| cd cloud/ui | |
| npm ci | |
| npm run build | |
| cd ../.. | |
| - name: Build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: 0 | |
| run: | | |
| go build -ldflags="-s -w -X main.Version=${{ github.ref_name }} -X main.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.GitCommit=${{ github.sha }}" -o cm-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} ./cmd/cm | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cm-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: cm-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: artifacts/**/* | |
| generate_release_notes: true |