-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dce480
commit 70f2068
Showing
6 changed files
with
300 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
name: Publish to Visual Studio Marketplace | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
name: Deploy Extension | ||
workflow_dispatch: | ||
# release: | ||
# types: [released] | ||
jobs: | ||
deploy: | ||
publish_to_marketplace: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Download VSIX file from latest release | ||
id: download_release | ||
uses: robinraju/release-downloader@v1.9 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
- run: npm install --frozen-lockfile | ||
- run: | | ||
export DISPLAY=:99 | ||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | ||
pnpm test | ||
- name: Publish to Visual Studio Marketplace | ||
latest: true | ||
fileName: "*.vsix" | ||
|
||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: lts/* | ||
# cache: npm | ||
# - run: npm install --frozen-lockfile | ||
# - run: | | ||
# export DISPLAY=:99 | ||
# sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | ||
# pnpm test | ||
- name: Publish to VS Marketplace | ||
uses: HaaLeo/publish-vscode-extension@v1 | ||
with: | ||
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | ||
registryUrl: https://marketplace.visualstudio.com | ||
registryUrl: https://marketplace.visualstudio.com | ||
extensionFile: ${{ fromJson(steps.download_release.outputs.downloaded_files)[0] }} | ||
- name: Publish to Open VSX Registry | ||
uses: HaaLeo/publish-vscode-extension@v1 | ||
with: | ||
pat: ${{ secrets.OPEN_VSX_TOKEN }} | ||
extensionFile: ${{ fromJson(steps.download_release.outputs.downloaded_files)[0] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Compile Dev Branch to VSIX | ||
|
||
# The workflow will trigger only when changes are pushed to the 'dev' branch | ||
on: | ||
push: | ||
branches: [ dev ] | ||
|
||
jobs: | ||
Compile-VSIX: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set outputs | ||
id: vars | ||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm install --frozen-lockfile | ||
- name: Setup VSCE | ||
run: npm install -g vsce | ||
# - name: Test | ||
# run: npm test | ||
- name: Package | ||
if: success() # Only upload if the previous 'Test' step succeeded | ||
run: npm run package | ||
- name: Upload VSIX artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ttslua-dev-${{ steps.vars.outputs.sha_short }} | ||
path: '*.vsix' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Create Release on Tag Push | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'pre-v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run compile | ||
|
||
- name: Upload VSIX to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: './your-vsix-file.vsix' | ||
asset_name: 'your-vsix-file.vsix' | ||
asset_content_type: 'application/vsix' | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
*Changes or descriptions can go here* | ||
draft: true | ||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-') }} |
Oops, something went wrong.