forked from sveltejs/language-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 1.45 KB
/
DeployExtensionsProd.yml
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
name: Tagged Production Deploys for VS Code
on:
push:
tags:
- "extensions-*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"
cache: yarn
# Ensure everything is compiling
- run: "yarn install"
- run: "yarn build"
# Lets us use one-liner JSON manipulations the package.json files
- run: "npm install -g json"
# Setup the environment
- run: 'json -I -f packages/svelte-vscode/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"'
# To deploy we need isolated node_modules folders which yarn won't do because it is a workspace
# So, remove the workspace
- run: "rm package.json yarn.lock" # Re-run the yarn install outside of the workspace
- run: |
cd packages/svelte-vscode
yarn install
# Just a hard constraint from the vscode marketplace's usage of azure tokens
echo "Once a year this expires, tell Orta to access https://dev.azure.com/ortatherox0608/_usersSettings/tokens (logging in with GitHub) to get a new one"
# Ship it
npx vsce publish --yarn -p $VSCE_TOKEN
npx ovsx publish --yarn -p $OVSX_TOKEN
env:
VSCE_TOKEN: ${{ secrets.AZURE_PAN_TOKEN }}
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}