add auto releaes #8
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_gdb | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| paths: | |
| - .github/workflows/build_gdb.yml | |
| - build/gdb/* | |
| - Dockerfile | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| TTY_ARG: "" # Disable interactive build mode in cicd since it does not contain a tty device. | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout https://github.com/guyush1/gdb-static.git | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: guyush1/gdb-static | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: sudo apt-get install -y wget | |
| - name: Build | |
| run: make build -j$((`nproc`+1)) | |
| - name: Pack | |
| run: make pack | |
| - name: List Dir | |
| run: ls -lRt ${{ github.workspace }} | |
| - name: Upload binary to artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gdb-linux-multi | |
| path: ${{ github.workspace }}/build/artifacts/gdb-static-*.gz | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: v1.0 | |
| name: "Release v1.0" | |
| artifacts: "${{ github.workspace }}/build/artifacts/gdb-static-*.gz" | |
| artifactErrorsFailBuild: false | |
| allowUpdates: true # 允许更新已存在的release | |
| token: ${{ secrets.GITHUB_TOKEN }} |