-
Notifications
You must be signed in to change notification settings - Fork 10
75 lines (64 loc) · 2.06 KB
/
deploy.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy Extension
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetching tags
run: git fetch --tags -f || true
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci || npm install
- name: Generate Changelog
id: generate_changelog
run: |
changelog=$(npm run changelog:last --silent)
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo -e "set-output name=changelog::${changelog-<empty>}\n"
echo -e "::set-output name=changelog::${changelog}\n"
- name: Package extension
uses: lannonbr/vsce-action@master
with:
args: "package -o clipboard-manager.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: ${{ github.ref }}
body: ${{ steps.generate_changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./clipboard-manager.vsix
asset_name: clipboard-manager.vsix
asset_content_type: application/zip
- name: Publish in marketplace
uses: lannonbr/vsce-action@master
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
- name: Publish in Open VSX Registry
run: npx ovsx publish clipboard-manager.vsix -p $OVSX_TOKEN
env:
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}