-
Notifications
You must be signed in to change notification settings - Fork 47
52 lines (43 loc) · 1.55 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Package extension
id: package_vsix
run: |
yarn package
echo ::set-output name=vsix_path::$(ls *.vsix)
version=$(jq --raw-output '.version' package.json)
echo ::set-output name=version::$version
- name: Ensure new version
run: |
latest_tag=$(curl --silent -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/jeanp413/open-remote-ssh/releases/latest | jq --raw-output '.tag_name')
if [ "$latest_tag" = "v${{ steps.package_vsix.outputs.version }}" ]; then
exit 1
fi
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.package_vsix.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ steps.package_vsix.outputs.vsix_path }}
# - name: Publish to MS Marketplace
# run: |
# npx vsce publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to Open VSX Registry
run: |
npx ovsx publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
env:
OVSX_PAT: ${{ secrets.OPEN_VSX_PAT }}