fix: 安装运行依赖 #2
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: Build and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Vendor dependencies | |
| run: go mod vendor | |
| - name: Build | |
| run: | | |
| chmod +x build.sh | |
| ./build.sh | |
| - name: Create tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| TAG="v1.0.${{ github.run_number }}" | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| - name: Create Draft Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v1.0.${{ github.run_number }} | |
| name: Release v1.0.${{ github.run_number }} | |
| draft: true | |
| files: | | |
| output/rime-mate-arm64 | |
| output/rime-mate-amd64 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |