Skip to content

Commit

Permalink
add deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
joelharkes committed Feb 18, 2024
1 parent 467d3c0 commit 541cd2d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publisch Extension
on:
release:
types:
- published
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Set package version
run: sed -i 's/__VERSION__/${{ github.ref }}/' package.json
- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
path: ${{ steps.packageExtension.outputs.vsixPath }}
# - name: Publish to Open VSX Registry
# uses: HaaLeo/publish-vscode-extension@v1
# with:
# pat: ${{ secrets.OPEN_VSX_TOKEN }}
# path: ${{ steps.packageExtension.outputs.vsixPath }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.packageExtension.outputs.vsixPath }}
asset_name: EmailViewer-${{ github.ref }}.vsix
tag: ${{ github.ref }}
overwrite: true
# body: "This is my release text"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "emlviewer",
"displayName": "EmlViewer",
"description": "A viewer for EML mail files",
"version": "0.0.1",
"version": "__VERSION__",
"engines": {
"vscode": "^1.86.0"
},
Expand Down

0 comments on commit 541cd2d

Please sign in to comment.