Skip to content

Release (golang.go-nightly) #154

Release (golang.go-nightly)

Release (golang.go-nightly) #154

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: '18'
cache: 'npm'
- name: Setup Go/Go+
uses: goplus/[email protected]
with:
go-version: '1.21'
gop-version: "main"
check-latest: true
cache: true
- name: Install dependencies
run: npm ci
- name: Prepare Release
run: build/all.bash prepare_nightly
- name: Version
run: |
echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV
- name: Package Extension
run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix"
- 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
run: xvfb-run -a 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'
run: |
echo "publishing ${{ env.VSCODE_GO_VERSION }}"
ls *.vsix
npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"