Skip to content

Automate package release process (#2094) #16

Automate package release process (#2094)

Automate package release process (#2094) #16

Workflow file for this run

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