Vscode-neovim: Publish to open-vsx / add CI deployments

Created on 27 May 2020  路  2Comments  路  Source: asvetliakov/vscode-neovim

Hello,

I was looking to get this extension published to the open-source visual studio code extension repository for use with VSCodium (community-driven, freely-licensed binary distribution of Microsoft鈥檚 editor VSCode)
https://open-vsx.org/

https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension

I was looking for a CI spot where I could pull request and set up the code where you would just need to add an access token but it doesn't look there is something such as Github Actions or Travis CI to use. I'd be happy to help set up some CI, or I might have missed it but didn't want to step on toes if there is already a process.

Thanks,
James

enhancement

Most helpful comment

You can start with github actions like this:


create-new-release.yml

name: Create new release

on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Install dependencies for build
      run: sudo apt-get install -y yarn npm

    - name: Checkout
      uses: actions/checkout@v2

    - name: Create package
      run: |
        export PATH="$(yarn global bin):$PATH"
        yarn global add vsce
        yarn install
        vsce package
        echo "::set-env name=EXTENSION_FILE::$(ls *.vsix)"
        echo "::set-env name=SHORT_SHA::${GITHUB_SHA::7}"

# Deploy
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GH Actions
      with:
        tag_name: ${{ env.SHORT_SHA }}
        release_name: Release ${{ env.SHORT_SHA }}

    - name: Upload release
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GH Actions
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: ${{ env.EXTENSION_FILE }}
        asset_name: vscode-neovim-${{ env.SHORT_SHA }}.vsix
        asset_content_type: application/vsix

All 2 comments

You can start with github actions like this:


create-new-release.yml

name: Create new release

on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Install dependencies for build
      run: sudo apt-get install -y yarn npm

    - name: Checkout
      uses: actions/checkout@v2

    - name: Create package
      run: |
        export PATH="$(yarn global bin):$PATH"
        yarn global add vsce
        yarn install
        vsce package
        echo "::set-env name=EXTENSION_FILE::$(ls *.vsix)"
        echo "::set-env name=SHORT_SHA::${GITHUB_SHA::7}"

# Deploy
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GH Actions
      with:
        tag_name: ${{ env.SHORT_SHA }}
        release_name: Release ${{ env.SHORT_SHA }}

    - name: Upload release
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GH Actions
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: ${{ env.EXTENSION_FILE }}
        asset_name: vscode-neovim-${{ env.SHORT_SHA }}.vsix
        asset_content_type: application/vsix

I would really happy to see vscode-neovim in open-vsx repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RAbraham picture RAbraham  路  4Comments

haberdashPI picture haberdashPI  路  3Comments

erlais picture erlais  路  3Comments

Shatur95 picture Shatur95  路  4Comments

zeljkofilipin picture zeljkofilipin  路  3Comments