blob: cc9d8f6bfac371a8a3f7d08b432f85d7e768bc7b [file] [log] [blame]
name: Release (golang.go-nightly)
# Daily release on 15:00 UTC, monday-thursday.
# Or, force to release by triggering repository_dispatch events by using
# 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" }'
on:
schedule:
- cron: "0 15 * * MON-THU" # 15 UTC, monday-thursday daily
repository_dispatch:
types: [force-release]
jobs:
release:
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
name: Release Nightly
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.15'
- name: Install dependencies
run: npm ci
- name: Prepare Release
run: build/all.bash prepare_nightly
- name: Compile
run: npm run vscode:prepublish
# TODO: use prerelease versions of tools (how? or master?)
- name: Install Go tools (Modules mode)
run: |
go version
go get github.com/acroca/go-symbols
go get github.com/davidrjenni/reftools/cmd/fillstruct
go get github.com/haya14busa/goplay/cmd/goplay
# Install two versions of gocode (one as gocode-gomod)
go get github.com/stamblerre/gocode
mv "${HOME}/go/bin/gocode${{env.EXT}}" "${HOME}/go/bin/gocode-gomod${{env.EXT}}"
go get github.com/mdempsky/gocode
go get github.com/sqs/goreturns
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs
go get github.com/zmb3/gogetdoc
go get honnef.co/go/tools/...
go get golang.org/x/tools/cmd/gorename
go get golang.org/x/tools/gopls
go get github.com/cweill/gotests/...
go get github.com/rogpeppe/godef
go get github.com/ramya-rao-a/go-outline
go get github.com/go-delve/delve/cmd/dlv@master
cp "${HOME}/go/bin/dlv${{env.EXT}}" "${HOME}/go/bin/dlv-dap${{env.EXT}}"
env:
GO111MODULE: on
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"
- name: Run unit tests
run: npm run unit-test
- name: Run tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm run test
env:
CODE_VERSION: 'insiders'
VSCODEGO_BEFORE_RELEASE_TESTS: true
- name: Publish
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
uses: lannonbr/vsce-action@704da577da0f27de5cdb4ae018374c2f08b5f523
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}