-
Notifications
You must be signed in to change notification settings - Fork 68
55 lines (52 loc) · 1.75 KB
/
publish.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
name: Publish
permissions:
id-token: write
on:
release:
types: [published]
jobs:
publish:
name: Langium Publish
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Build
shell: bash
run: |
npm ci
npm run build:clean
- name: Test
if: success() || failure()
shell: bash
run: |
npm run test
- name: Publish NPM Packages
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Update the following list when a new npm package is added
run: |
npm run publish:latest --provenance --workspace=langium
npm run publish:latest --provenance --workspace=langium-railroad
npm run publish:latest --provenance --workspace=langium-cli
npm run publish:latest --provenance --workspace=langium-sprotty
npm run publish:latest --provenance --workspace=generator-langium
npm run publish:latest --provenance --workspace=langium-arithmetics-dsl
npm run publish:latest --provenance --workspace=langium-domainmodel-dsl
npm run publish:latest --provenance --workspace=langium-statemachine-dsl
- name: Publish VSCode Extension
shell: bash
run: |
npm install -g @vscode/vsce ovsx
cd packages/langium-vscode
PACKAGE_VERSION=`npm pkg get version --workspaces=false | tr -d \"`
vsce package
vsce publish -i langium-vscode-$PACKAGE_VERSION.vsix -p ${{ secrets.VSCE_TOKEN }}
ovsx publish langium-vscode-$PACKAGE_VERSION.vsix -p ${{ secrets.OVSX_TOKEN }}