Skip to content

Commit

Permalink
add github action template (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossknudsen committed Mar 22, 2024
1 parent 9358d32 commit d864180
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 69 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
on:
workflow_dispatch:
inputs:
publish:
description: Whether the extension should be published to the extension registries.
type: boolean
default: false
version:
description: The SemVer version for this Build
required: true
default: "0.0.0"
type: string
preRelease:
description: Whether the extension is a pre-release version or not.
required: true
type: boolean
default: true

name: Build and deploy extension
jobs:
build:
runs-on: ubuntu-latest
outputs:
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci && cd webview-ui && npm ci

- name: Build Webview
run: cd webview-ui && npm run build

- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true

- name: Upload Extension Package as Artifact
uses: actions/upload-artifact@v2
with:
name: vsix
path: ${{ steps.packageExtension.outputs.vsixPath }}

publish:
runs-on: ubuntu-latest
needs: build
if: ${{ github.event.inputs.publish == 'true' }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci && cd webview-ui && npm ci

- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
name: vsix

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
extensionFile: ${{ needs.build-lint-test.outputs.vsixPath }}
registryUrl: https://marketplace.visualstudio.com
preRelease: ${{ github.event.inputs.preRelease }}

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: ${{ needs.build-lint-test.outputs.vsixPath }}
preRelease: ${{ github.event.inputs.preRelease }}
69 changes: 0 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,2 @@
# vscode-nuget-package-manager README

This is the README for your extension "vscode-nuget-package-manager". After writing up a brief description, we recommend including the following sections.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)

**Enjoy!**
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"displayName": "VS Code Nuget Package Manager",
"description": "GUI to install nuget packages",
"version": "0.0.1",
"publisher": "kavod-io",
"repository": {
"type": "git",
"url": "https://github.com/kavod-io/vscode-nuget-package-manager"
},
"engines": {
"vscode": "^1.75.0"
},
Expand Down

0 comments on commit d864180

Please sign in to comment.