Skip to content

Commit

Permalink
fixing workflow and icon issue in package
Browse files Browse the repository at this point in the history
  • Loading branch information
LinceMathew committed Aug 18, 2024
1 parent 633e309 commit 73edcb5
Show file tree
Hide file tree
Showing 12 changed files with 4,476 additions and 5 deletions.
53 changes: 53 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
Before submitting a Merge Request, please ensure you've done the following:
- 👷‍♀️ Create small MRs. In most cases, this will be possible.
- 📝 Use descriptive commit messages.
-->

## What type of MR is this? (check all applicable)

- [ ] 🍕 Feature
- [x] 🐛 Bug Fix
- [ ] 📝 Doc Update
- [ ] 🎨 Style
- [ ] 🧑‍💻 Code Refactor
- [ ] 🔥 Performance Improvements
- [ ] ✅ Test
- [ ] 🤖 Build
- [ ] 🔁 CI
- [ ] ⏩ Revert

## Description

<!--
Please do not leave this blank
This MR [adds/removes/fixes/replaces] the [feature/bug/etc].
-->

## Important files to start review from

## Mobile & Desktop Screenshots/Recordings

## Added tests?

- [ ] 👍 yes
- [x] 🙅 no, because they aren't needed
- [ ] 🙋 no, because I need help

## Added to documentation?

- [x] 📜 README.md
- [ ] 🙅 no documentation needed

## Prettify the repositary

`npm run format`

- [ ] 👍
- [x] 🙅 no

## [optional] Are there any post-deployment tasks we need to perform?

## [optional] What gif best describes this MR or how it makes you feel?

![alt text](URL of the GIF file)
51 changes: 51 additions & 0 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Internal Release

on:
workflow_dispatch:
push:
tags:
- 'v*-internal'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install root dependencies
run: npm ci

- name: Install webview dependencies
working-directory: ./webview
run: npm ci

- name: Build webview
run: npm run build:webview

- name: Install vsce
run: npm install -g @vscode/vsce

- name: Package Extension
run: vsce package

- name: Upload VSIX as artifact
uses: actions/upload-artifact@v3
with:
name: extension
path: "*.vsix"

- name: Create Internal Release
uses: softprops/action-gh-release@v1
with:
files: "*.vsix"
prerelease: true
name: Internal Release ${{ github.ref_name }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish VS Code Extension

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Install Dependencies with Yarn
run: yarn install

- name: Update Version in package.json
run: |
VERSION=${GITHUB_REF#refs/tags/}
npm version $VERSION --no-git-tag-version
- name: Package Extension
run: npx vsce package

- name: Publish Extension
run: npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSC_PERSONAL_ACCESS_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
out
dist
node_modules
.vscode-test/
*.vsix
1 change: 0 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ webview/README.md
webview/package.json
webview/package-lock.json
webview/node_modules/**
webview/codicons/**

# Ignore Misc
.yarnrc
Expand Down
2 changes: 1 addition & 1 deletion src/panels/RequestPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class Lama2Panel {
// The JS file from the React build output
const scriptUri = getUri(webview, this._extensionUri, ["webview", "build", "assets", "index.js"]);

const codiconsUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, 'webview', 'codicons', 'dist', 'codicon.css'));
const codiconsUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, 'webview', 'codicons','dist', 'codicon.css'));

const nonce = getNonce();

Expand Down
1 change: 0 additions & 1 deletion webview/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
build
build-ssr
Expand Down
Loading

0 comments on commit 73edcb5

Please sign in to comment.