From 9c95935d8a9a65fb15cb3bd614559c9585a6e8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Mon, 26 Sep 2022 22:30:44 -0400 Subject: [PATCH 1/2] Set up publishing to marketplace, triggered by tag --- .github/workflows/ci.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10ec4af..96f240a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,27 +8,30 @@ on: jobs: build: - name: CI + name: CI strategy: fail-fast: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Yarn install and build + run: yarn install && yarn compile - - name: Package + deploy: + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + name: Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Install vsce and deps run: | - npm install -g vsce - mkdir -p bin/ - npm i - vsce package --allow-star-activation -o bin/langoustine-vscode.vsix - - - uses: actions/upload-artifact@v3 - with: - path: bin/ - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: "bin/**/*.vsix" + yarn global add vsce + yarn install + - name: Publish + run: | + echo $RELEASE_VERSION + vsce publish -p $VSCODE_TOKEN --no-git-tag-version ${RELEASE_VERSION:1} + env: + VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }} From 5778e890a844b7d44b9d404a1ef7127f7c51d3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Mon, 26 Sep 2022 22:33:24 -0400 Subject: [PATCH 2/2] Correct publisher --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d490dd6..97eb648 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "langoustine-vscode", "description": "Langoustine VS Code extension - for language server developers", - "author": "Neandertech", + "author": "neandertech", "version": "0.0.1", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/neandertech/langoustine-vscode" }, - "publisher": "neander.tech", + "publisher": "neandertech", "categories": [], "engines": { "vscode": "^1.66.0"