添加LIC #1
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: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.2' | |
| - name: Enable Go Modules and Download Dependencies | |
| run: | | |
| go mod tidy | |
| go mod download | |
| - name: Install protoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler | |
| go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
| echo "$GOPATH/bin" >> $GITHUB_PATH | |
| - name: Install Docker | |
| run: | | |
| sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
| echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
| - name: Install Docker Compose | |
| run: | | |
| sudo wget "https://github.com/docker/compose/releases/download/v2.33.1/docker-compose-linux-x86_64" -O /usr/bin/docker-compose | |
| sudo chmod +x /usr/bin/docker-compose | |
| - name: Build and Release | |
| run: make release | |
| - name: Upload artifacts 1 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: StealthIMFileAPI | |
| path: ./bin/StealthIMFileAPI | |
| - name: Upload artifacts 2 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: StealthIMFileAPI.exe | |
| path: ./bin/StealthIMFileAPI.exe | |
| - name: Upload artifacts 3 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: StealthIMFileAPI.docker.zst | |
| path: ./bin/StealthIMFileAPI.docker.zst |