|
| 1 | +name: release |
| 2 | + |
| 3 | +# Daily release on 15:00 UTC, monday-thursday. |
| 4 | +# Or, force to release by triggering repository_dispatch events by using |
| 5 | +# curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/golang/vscode-go/dispatches -d '{ "event_type": "force-release" }' |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "0 15 * * MON-THU" # 15 UTC, monday-thursday daily |
| 9 | + repository_dispatch: |
| 10 | + types: [force-release] |
| 11 | + |
| 12 | +env: |
| 13 | + GOPATH: /tmp/go |
| 14 | + # Because some tests require explicit setting of GOPATH. TODO: FIX THEM. |
| 15 | + |
| 16 | +jobs: |
| 17 | + release: |
| 18 | + name: Release Nightly |
| 19 | + runs-on: ubuntu-latest |
| 20 | + timeout-minutes: 20 |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Clone repository |
| 24 | + uses: actions/checkout@v1 |
| 25 | + |
| 26 | + - name: Setup Node |
| 27 | + uses: actions/setup-node@v1 |
| 28 | + with: |
| 29 | + node-version: '10.x' |
| 30 | + |
| 31 | + - name: Setup Go |
| 32 | + uses: actions/setup-go@v1 |
| 33 | + with: |
| 34 | + go-version: '1.14' |
| 35 | + |
| 36 | + - name: Install dependencies |
| 37 | + run: npm ci |
| 38 | + |
| 39 | + - name: Install Go tools (Modules mode) |
| 40 | + run: | |
| 41 | + go version |
| 42 | + go get github.com/acroca/go-symbols \ |
| 43 | + github.com/davidrjenni/reftools/cmd/fillstruct \ |
| 44 | + github.com/haya14busa/goplay/cmd/goplay \ |
| 45 | + github.com/mdempsky/gocode \ |
| 46 | + github.com/sqs/goreturns \ |
| 47 | + github.com/uudashr/gopkgs/v2/cmd/gopkgs \ |
| 48 | + github.com/zmb3/gogetdoc \ |
| 49 | + golang.org/x/lint/golint \ |
| 50 | + golang.org/x/tools/cmd/gorename |
| 51 | + env: |
| 52 | + GO111MODULE: on |
| 53 | + |
| 54 | + - name: Install Go tools (GOPATH mode) |
| 55 | + run: | |
| 56 | + go version |
| 57 | + go get github.com/cweill/gotests/... \ |
| 58 | + github.com/rogpeppe/godef \ |
| 59 | + github.com/ramya-rao-a/go-outline |
| 60 | + # Because some tests depend on the source code checked in GOPATH. TODO: FIX THEM. |
| 61 | + env: |
| 62 | + GO111MODULE: off |
| 63 | + |
| 64 | + - name: Prepare Release |
| 65 | + run: build/all.bash prepare_nightly |
| 66 | + |
| 67 | + - name: Run unit tests |
| 68 | + run: npm run unit-test |
| 69 | + continue-on-error: true |
| 70 | + |
| 71 | + - name: Run tests |
| 72 | + |
| 73 | + with: |
| 74 | + run: npm run test |
| 75 | + env: |
| 76 | + CODE_VERSION: 'insiders' |
| 77 | + |
| 78 | + - name: Publish |
| 79 | + if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go' |
| 80 | + uses: lannonbr/vsce-action@704da577da0f27de5cdb4ae018374c2f08b5f523 |
| 81 | + with: |
| 82 | + args: "publish -p $VSCE_TOKEN" |
| 83 | + env: |
| 84 | + VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |
0 commit comments