| 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.17' |
| |
| - 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@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@0f3391ee0477b08fae949eb0a875e91e6d20b075 |
| with: |
| args: "publish -p $VSCE_TOKEN" |
| env: |
| VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |