Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
release:
types: [published]

permissions:
contents: read
Expand Down Expand Up @@ -73,11 +71,3 @@ jobs:
with:
name: cml-language-server
path: ./cml-ls/

- name: Prepare publication
if: github.event_name == 'release' # Publish only on release creation
run: sed -i -e 's/<TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .yarnrc.yml

- name: Publish to GitHub Package Registry
if: github.event_name == 'release' # Publish only on release creation
run: yarn npm publish --access public
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Workflow

on:
push:
tags:
- 'v*'

jobs:
release-build:
uses: ./.github/workflows/build.yml
secrets: inherit

release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
- name: Download language-server artifact
uses: actions/download-artifact@v4
with:
name: cml-language-server
path: ./cml-ls

- name: Prepare publication
run: sed -i -e 's/<TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .yarnrc.yml

- name: Publish to GitHub Package Registry
run: yarn npm publish --access public

- name: Create GitHub release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: ./cml-ls
Loading