Skip to content

Commit 611e665

Browse files
authored
Do tag-based deployment for svelte-check (#789)
`svelte-check` now is deployed only when a tag starting with `svelte-check-` is pushed. The VS Code extension now is deployed only when a tag starting with `extensions-` is pushed. Reason is that quite some people rely on `svelte-check` by now which demands a more manual deployment with dedicated changelogs.
1 parent 1bf83fc commit 611e665

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/Deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ jobs:
4444
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
4545
with:
4646
sort: '["svelte2tsx", "svelte-language-server", "svelte-check", "svelte-vscode-nightly"]'
47+
only: '["svelte2tsx", "svelte-language-server", "svelte-vscode-nightly"]'
4748
install: "true"

.github/workflows/DeployExtensionsProd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Tagged Production Deploys
33
on:
44
push:
55
tags:
6-
- "*"
6+
- "extensions-*"
77

88
jobs:
99
deploy:
@@ -24,7 +24,7 @@ jobs:
2424
- run: "npm install -g json"
2525

2626
# Setup the environment
27-
- run: 'json -I -f packages/svelte-vscode/package.json -e "this.version=\`${{ github.ref }}\`.split(\`/\`).pop()"'
27+
- run: 'json -I -f packages/svelte-vscode/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"'
2828

2929
# To deploy we need isolated node_modules folders which yarn won't do because it is a workspace
3030
# So, remove the workspace
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tagged Production Deploys
2+
3+
on:
4+
push:
5+
tags:
6+
- "svelte-check-*"
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "12.x"
17+
registry-url: "https://registry.npmjs.org"
18+
19+
# Ensure everything is compiling
20+
- run: "yarn install"
21+
- run: "yarn build"
22+
23+
# Lets us use one-liner JSON manipulations the package.json files
24+
- run: "npm install -g json"
25+
26+
# Setup the environment
27+
- run: 'json -I -f packages/svelte-check/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"'
28+
29+
# Ship it
30+
- run: |
31+
cd packages/svelte-check
32+
npm install
33+
npm publish
34+
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)