forked from golang/vscode-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release-nightly.yaml
84 lines (84 loc) · 2.3 KB
/
release-nightly.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This workflow will be triggered daily.
# For local testing, run:
# 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
- 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/extension
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/extension
id: build .vsix
entrypoint: npm
- name: ubuntu
args:
- '-c'
- ls -1 go-nightly-*.vsix | tee /workspace/vsix_name.txt
dir: vscode-go/extension
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_PAT
--baseContentUrl=https://github.com/golang/vscode-go
--baseImagesUrl=https://github.com/golang/vscode-go
dir: vscode-go/extension
id: publish nightly extension
entrypoint: bash
secretEnv:
- VSCE_PAT
timeout: 1800s
options:
machineType: E2_HIGHCPU_8
substitutionOption: ALLOW_LOOSE
artifacts:
objects:
location: 'gs://$PROJECT_ID/nightly'
paths:
- vscode-go/extension/*.vsix
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/$_VSCE_TOKEN/versions/latest
env: VSCE_PAT