Skip to content

Commit

Permalink
added publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Gololicic committed May 19, 2023
1 parent f42fc34 commit 768d921
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Langauge Server and NPM package.json versions
name: Publish LS NPM Package

on:
release:
Expand All @@ -7,6 +7,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
# This only runs this action if the release was made for language server
if: startsWith(github.event.release.target_commitish, 'refs/tags/languageserver')
run: |
Expand Down Expand Up @@ -36,3 +43,11 @@ jobs:
# Create a pull request with the changes
gh pr create --title "Update LS NPM version to $release_version" --body "Updating the version in package.json to $release_version. After this PR is merged an GitHub action will automatically publish the NPM package." --base main --head version-update
# Run build of LS
npm build
# Publish npm package
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 768d921

Please sign in to comment.