name: 自动版本发布 on: push: branches: - main jobs: AutoRelease: # 如果有Release标签则运行jobs if: "contains(github.event.head_commit.message, 'Release')" # 工作在ubuntu-latest系统中 runs-on: ubuntu-latest # 以下是steps steps: # 检出仓库 - name: Checkout uses: https://gitee.com/actions-mirror/checkout@v4 with: fetch-depth: 0 # 启用子模块支持 submodules: true - name: 设置环境变量 env: GITEA_TOKEN: ${{ secrets.AUTOGENERATE }} GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }} REPO_NAME: ${{ github.event.repository.name }} run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.git.linuxacme.com" - name: 替换软件源为国内软件源(USTC) run: | cat /etc/os-release sudo rm -f /etc/apt/sources.list sudo rm -f /etc/apt/sources.list.d/* sudo tee /etc/apt/sources.list <