github.com/ipfans/trojan-go@v0.11.0/.github/workflows/release-build.yml (about) 1 on: 2 push: 3 tags: 4 - "v*.*.*" 5 name: release-build 6 jobs: 7 build: 8 runs-on: ubuntu-latest 9 steps: 10 - name: Install Go 11 uses: actions/setup-go@v2 12 with: 13 go-version: ^1.17.1 14 15 - name: Checkout code 16 uses: actions/checkout@v2 17 18 - name: Checkout tag 19 run: | 20 git fetch --depth=1 origin +refs/tags/*:refs/tags/* 21 tag_name="${GITHUB_REF##*/}" 22 echo Tag $tag_name 23 git checkout $tag_name 24 echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV 25 26 - name: Build 27 run: | 28 make release -j$(nproc) 29 30 - name: Release 31 uses: svenstaro/upload-release-action@v2 32 with: 33 repo_token: ${{ secrets.GITHUB_TOKEN }} 34 tag: ${{ env.TAG_NAME }} 35 file: ./trojan-go-*.zip 36 file_glob: true 37 prerelease: true