build: finish migration of nightly release to gcb
Delete the github workflow.
The new gcb workflow is tested. Go Nightly v2023.12.2718 was
released from GCB.
Change-Id: Ief89f3f914832c300981fe666e5d1ef82ff41558
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/553015
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml
deleted file mode 100644
index d16e226..0000000
--- a/.github/workflows/release-nightly.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-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@v4
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: '18'
- cache: 'npm'
-
- - name: Setup Go
- uses: actions/setup-go@v4
- with:
- go-version: '1.21'
- 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 }}"
diff --git a/build/release-nightly.yaml b/build/release-nightly.yaml
index 6caefd3..30f34e4 100644
--- a/build/release-nightly.yaml
+++ b/build/release-nightly.yaml
@@ -1,44 +1,84 @@
# This workflow will be triggered daily.
# For local testing, run:
-# gcloud builds submit --config release-nightly.yaml
+# gcloud builds submit --config release-nightly.yaml --no-source
# This will check out the vscode-go repo master branch and run the build from it.
steps:
# TODO: check build/test status
-- id: clone vscode-go repo
- name: "gcr.io/cloud-builders/git"
- args: ['clone', '--branch=master', "--depth=1", 'https://go.googlesource.com/vscode-go', 'vscode-go']
-- id: adjust file permissions
- name: "gcr.io/cloud-builders/docker"
- entrypoint: "chown"
- args: ["-R", "1000:1000", "/workspace", "/builder/home"] # ci-image sets USER to node whose uid/gid are 1000.
- dir: "/"
-- id: install npm dependencies
- name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
- entrypoint: npm
- args: ["ci"]
- dir: "vscode-go"
-- id: prepare nightly release
- name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
- entrypoint: "bash"
- args: ["build/all.bash", 'prepare_nightly']
- dir: "vscode-go"
-- id: build .vsix
- name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
- entrypoint: npm
- args: ["run", "package"] # we build vsix before running tests to avoid including unintentional changes.
- dir: "vscode-go"
-- id: run tests
- name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
- entrypoint: "bash"
- args: ["build/all.bash", "test_nightly"]
- dir: "vscode-go"
- env:
- - "IN_RELEASE_WORKFLOW=true"
+ - name: gcr.io/cloud-builders/git
+ args:
+ - clone
+ - '--branch=master'
+ - '--depth=1'
+ - 'https://go.googlesource.com/vscode-go'
+ - vscode-go
+ id: clone vscode-go repo
+ - name: gcr.io/cloud-builders/docker
+ args:
+ - '-R'
+ - '1000:1000'
+ - /workspace
+ - /builder/home
+ dir: /
+ id: adjust file permissions
+ entrypoint: chown
+ - name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
+ args:
+ - ci
+ dir: vscode-go
+ id: install npm dependencies
+ entrypoint: npm
+ - name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
+ args:
+ - build/all.bash
+ - prepare_nightly
+ dir: vscode-go
+ id: prepare nightly release
+ entrypoint: bash
+ - name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
+ args:
+ - run
+ - package
+ dir: vscode-go
+ id: build .vsix
+ entrypoint: npm
+ - name: ubuntu
+ args:
+ - '-c'
+ - ls -1 go-nightly-*.vsix | tee /workspace/vsix_name.txt
+ dir: vscode-go
+ id: store the vsix file name
+ entrypoint: bash
+ - name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
+ env:
+ - IN_RELEASE_WORKFLOW=true
+ args:
+ - build/all.bash
+ - test_nightly
+ dir: vscode-go
+ id: run tests
+ entrypoint: bash
+ - name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
+ args:
+ - '-c'
+ - >
+ npx vsce publish -i $(cat /workspace/vsix_name.txt) -p $$VSCE_TOKEN
+ --baseContentUrl=https://github.com/golang/vscode-go
+ --baseImagesUrl=https://github.com/golang/vscode-go
+ dir: vscode-go
+ id: publish nightly extension
+ entrypoint: bash
+ secretEnv:
+ - VSCE_TOKEN
+timeout: 1800s
options:
- substitution_option: "ALLOW_LOOSE"
- machineType: 'E2_HIGHCPU_8' # tests need powerful cpus to avoid timeout.
-images: ['us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image:latest']
+ machineType: E2_HIGHCPU_8
+ substitutionOption: ALLOW_LOOSE
artifacts:
objects:
- location: "gs://$PROJECT_ID/nightly"
- paths: ["vscode-go/*.vsix"] # vsix file base name includes the extension version.
+ location: 'gs://$PROJECT_ID/nightly'
+ paths:
+ - vscode-go/*.vsix
+availableSecrets:
+ secretManager:
+ - versionName: projects/$PROJECT_ID/secrets/$_VSCE_TOKEN/versions/latest
+ env: VSCE_TOKEN