-
Notifications
You must be signed in to change notification settings - Fork 106
62 lines (59 loc) · 1.98 KB
/
release.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
tags:
- "*"
name: Deploy Extension
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: validate version
run: |
VERSION=$(jq -r .version package.json)
if [[ "$GITHUB_REF_NAME" != "v$VERSION" ]]; then
echo "package.json version $VERSION does not match commit tag $GITHUB_REF_NAME"
exit 1
fi
- uses: actions/setup-node@v4
with:
node-version: "18.x"
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.15.x
otp-version: 26.x
- run: npm ci
- run: cd elixir-ls && mix deps.get
- name: Dry run
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ contains(github.ref, '-rc.') }}
with:
pat: "dummy"
preRelease: true
dryRun: true
- name: set publisher for Visual Studio Marketplace
if: ${{ !contains(github.ref, '-rc.') }}
run: |
jq '.publisher = "JakeBecker"' package.json > package_temp.json
mv package_temp.json package.json
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ !contains(github.ref, '-rc.') }}
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
# preRelease: ${{ contains(github.ref, '-rc.') }}
- name: set publisher for Open VSX Registry
if: ${{ !contains(github.ref, '-rc.') }}
run: |
jq '.publisher = "elixir-lsp"' package.json > package_temp.json
mv package_temp.json package.json
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ !contains(github.ref, '-rc.') }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
# preRelease: ${{ contains(github.ref, '-rc.') }}