github.com/MerlinKodo/sing-shadowsocks2@v0.1.6/.github/workflows/debug.yml (about)

     1  name: Debug build
     2  
     3  on:
     4    push:
     5      branches:
     6        - dev
     7      paths-ignore:
     8        - '**.md'
     9        - '.github/**'
    10        - '!.github/workflows/debug.yml'
    11    pull_request:
    12      branches:
    13        - dev
    14  
    15  jobs:
    16    build:
    17      name: Debug build
    18      runs-on: ubuntu-latest
    19      steps:
    20        - name: Checkout
    21          uses: actions/checkout@v3
    22          with:
    23            fetch-depth: 0
    24        - name: Get latest go version
    25          id: version
    26          run: |
    27            echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
    28        - name: Setup Go
    29          uses: actions/setup-go@v3
    30          with:
    31            go-version: ${{ steps.version.outputs.go_version }}
    32        - name: Add cache to Go proxy
    33          run: |
    34            version=`git rev-parse HEAD`
    35            mkdir build
    36            pushd build
    37            go mod init build
    38            go get -v github.com/sagernet/sing-shadowsocks2@$version
    39            popd
    40          continue-on-error: true
    41        - name: Build
    42          run: |
    43            make test