Skip to content

Commit 98098fe

Browse files
committed
Update GitHub actions
1 parent 3b73b18 commit 98098fe

File tree

3 files changed

+50
-60
lines changed

3 files changed

+50
-60
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
token: ${{ secrets.GH_PAT }}
15+
ref: ${{ github.head_ref }}
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version-file: ".nvmrc"
19+
20+
- run: npm ci
21+
22+
# TODO: add lint workflow call
23+
24+
- name: Get version
25+
id: version
26+
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
27+
28+
- name: Bump version in package.json
29+
run: npm version ${{ steps.version.outputs.version }} --no-commit-hooks --no-git-tag-version
30+
31+
- name: Publish to Visual Studio Marketplace
32+
id: publishToVSMarketplace
33+
uses: HaaLeo/publish-vscode-extension@v2
34+
with:
35+
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
36+
registryUrl: https://marketplace.visualstudio.com
37+
38+
- name: Publish to Open VSX Registry
39+
uses: HaaLeo/publish-vscode-extension@v2
40+
with:
41+
pat: ${{ secrets.OVSX_TOKEN }}
42+
43+
- name: Attach release asset
44+
uses: svenstaro/upload-release-action@v2
45+
with:
46+
repo_token: ${{ secrets.GITHUB_TOKEN }}
47+
file: ${{ steps.publishToVSMarketplace.outputs.vsixPath }}
48+
asset_name: digma-${{ steps.version.outputs.version }}.vsix
49+
tag: ${{ github.ref }}
50+
overwrite: true

0 commit comments

Comments
 (0)