github.com/igoogolx/clash@v1.19.8/.github/workflows/release.yml (about)

     1  name: Release
     2  on: [push]
     3  jobs:
     4    build:
     5      runs-on: ubuntu-latest
     6      steps:
     7        - name: Setup Go
     8          uses: actions/setup-go@v4
     9          with:
    10            check-latest: true
    11            go-version: '1.21'
    12  
    13        - name: Check out code into the Go module directory
    14          uses: actions/checkout@v3
    15  
    16        - name: Cache go module
    17          uses: actions/cache@v3
    18          with:
    19            path: |
    20              ~/go/pkg/mod
    21              ~/.cache/go-build
    22            key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    23            restore-keys: |
    24              ${{ runner.os }}-go-
    25  
    26        - name: Build
    27          if: startsWith(github.ref, 'refs/tags/')
    28          env:
    29            NAME: clash
    30            BINDIR: bin
    31          run: make -j $(go run ./test/main.go) releases
    32  
    33        - name: Upload Release
    34          uses: softprops/action-gh-release@v1
    35          if: startsWith(github.ref, 'refs/tags/')
    36          with:
    37            files: bin/*
    38            draft: true