-
-
Notifications
You must be signed in to change notification settings - Fork 96
166 lines (136 loc) · 4.8 KB
/
Copy pathdeploy.yaml
File metadata and controls
166 lines (136 loc) · 4.8 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Deploy
on:
workflow_run:
workflows: [Run Tests]
types: [completed]
branches: [main]
jobs:
publish-to-open-vsx:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: production
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# This is needed to get the number of commits in the current branch
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm --color install
- name: Compile
run: pnpm --color compile
- name: Build
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
env:
CURSORLESS_DEPLOY: true
- name: Publish to Open VSX Registry
id: publishToOpenVSX
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
packagePath: packages/cursorless-vscode/dist
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: vscode-extension
path: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
retention-days: 1
publish-to-vs-marketplace:
runs-on: ubuntu-latest
needs: publish-to-open-vsx
environment: production
steps:
- name: Download VSIX
uses: actions/download-artifact@v4
with:
name: vscode-extension
- name: Get VSIX file path
id: getPath
run: |
VSIX_FILE=$(find . -maxdepth 1 -name "*.vsix" -type f)
echo "vsixPath=$VSIX_FILE" >> $GITHUB_OUTPUT
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.getPath.outputs.vsixPath }}
publish-neovim-extension:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: production
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
STAGING_DIRECTORY: ${{ github.workspace }}/cursorless.nvim-staging
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm --color install
- name: Compile
run: pnpm --color compile
- name: Build
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
env:
CURSORLESS_DEPLOY: true
- name: Checkout cursorless.nvim plugin repo
uses: actions/checkout@v4
with:
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
repository: hands-free-vim/cursorless.nvim
path: ${{ env.STAGING_DIRECTORY }}
- name: Configure GPG Key
working-directory: ${{ env.STAGING_DIRECTORY }}
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}
- name: git config
working-directory: ${{ env.STAGING_DIRECTORY }}
run: |
git config user.name cursorless-bot
git config user.email 98099035+cursorless-bot@users.noreply.github.com
git config user.signingkey A9387720AFC62221
git config commit.gpgsign true
- name: Push compiled files to cursorless.nvim plugin repo
run: bash -x scripts/deploy-cursorless-nvim.sh ${{ env.STAGING_DIRECTORY }}
push-cursorless-talon:
name: Push cursorless-talon subrepo
runs-on: ubuntu-latest
needs: [publish-to-vs-marketplace, publish-neovim-extension]
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
- name: Configure GPG Key
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}
- name: git config
run: |
git config user.name cursorless-bot
git config user.email 98099035+cursorless-bot@users.noreply.github.com
git config user.signingkey A9387720AFC62221
git config commit.gpgsign true
- name: Push cursorless-talon subrepo
run: bash -x scripts/deploy-cursorless-talon.sh