-
Notifications
You must be signed in to change notification settings - Fork 96
50 lines (47 loc) · 1.13 KB
/
publish.yml
File metadata and controls
50 lines (47 loc) · 1.13 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
name: Publish
permissions:
id-token: write
# Required to mark the action as cancelled
actions: write
on:
push:
# Only trigger on changes to package.json files in the main and maintenance branches
branches:
- 'main'
- 'maintenance/**'
paths:
- '**/package.json'
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@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Build
shell: bash
run: |
npm ci
npm run build:clean
npm run langium:generate:production --workspace=langium
npm run build
- name: Test
if: success() || failure()
shell: bash
run: |
npm run test
- name: Publish
shell: bash
env:
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ github.run_id }}
run: |
npm run publish:updated