-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (72 loc) · 2.91 KB
/
publish.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
76
77
78
79
80
81
# Workflow that publishes the VS Code extension to the VS Marketplace and
# Open VSX, the packages to npm, and attaches assets to the new release.
name: publish
on:
release:
types: [published]
jobs:
distribute:
name: "Distribute VSCode extension"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: 'https://registry.npmjs.org'
scope: '@kieler'
- run: yarn
- run: yarn distribute
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
- name: Publish klighd-interactive
run: yarn publish
working-directory: ./packages/klighd-interactive
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish klighd-core
run: yarn publish
working-directory: ./packages/klighd-core
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release-assets:
name: "Add assets to release"
runs-on: ubuntu-latest
# Github has no official action for this. Uses: https://github.com/JasonEtco/upload-to-release
# Uploads each CLI asset separately to create more targeted download options
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
- run: yarn
- run: yarn package
- name: Upload VSIX
uses: JasonEtco/upload-to-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ./applications/klighd-vscode/klighd-vscode.vsix application/octet-stream
- name: Upload CLI Linux
uses: JasonEtco/upload-to-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ./applications/klighd-cli/bin/klighd-linux application/octet-stream
- name: Upload CLI MacOS
uses: JasonEtco/upload-to-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ./applications/klighd-cli/bin/klighd-macos application/octet-stream
- name: Upload CLI Windows
uses: JasonEtco/upload-to-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ./applications/klighd-cli/bin/klighd-win.exe application/octet-stream