blob: 1da361c520c0e24cfdc694f527f27e591dfadb69 [file] [log] [blame]
name: Release (golang.go-nightly)
# Daily release on 15:00 UTC, monday-thursday.
# Or, trigger with workflow dispatch event.
on:
schedule:
- cron: "0 15 * * MON-THU" # 15 UTC, monday-thursday daily
workflow_dispatch:
jobs:
release:
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
name: Release Nightly
runs-on: ubuntu-latest
environment: nightly
timeout-minutes: 20
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
check-latest: true
cache: true
- 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 run ./tools/installtools/main.go
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@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d
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@0f3391ee0477b08fae949eb0a875e91e6d20b075
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}