Skip to content

Commit 1d1939f

Browse files
committed
Changes required for publication on marketplaces
Signed-off-by: Mario Loriedo <[email protected]>
1 parent e0a41e8 commit 1d1939f

21 files changed

+934
-396
lines changed

.github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "sunday"
8+
time: "16:00"
9+
groups:
10+
all-actions:
11+
patterns: [ "*" ]
12+
- package-ecosystem: "npm"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
day: "sunday"
17+
time: "16:00"

.github/workflows/pr-verify.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pr-verify
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pr-verify-job:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check Out Code
10+
uses: actions/checkout@v2
11+
- name: Set Up NodeJS
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: '18'
15+
- run: npm install -g typescript "vsce"
16+
- run: npm install
17+
- run: npm run compile
18+
- run: npm run vscode:prepublish
19+
- run: npm run build-vsix
20+
- run: ls -ll *.vsix
21+
- run: npm run eslint

.github/workflows/release.yaml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
publishToMarketPlace:
7+
description: "Publish to VS Code Marketplace ?"
8+
required: true
9+
type: choice
10+
options:
11+
- "true"
12+
- "false"
13+
default: "false"
14+
publishToOVSX:
15+
description: "Publish to OpenVSX Registry ?"
16+
required: true
17+
type: choice
18+
options:
19+
- "true"
20+
- "false"
21+
default: "false"
22+
jobs:
23+
packaging-job:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Check Out vscode-devfile
27+
uses: actions/checkout@v2
28+
- name: Set Up NodeJS
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: "18"
32+
- name: Install NodeJS dependencies
33+
run: npm install -g typescript "@vscode/vsce" "ovsx"
34+
- name: Build vscode-devfile
35+
run: |
36+
npm install
37+
npm run vscode:prepublish
38+
npm run compile
39+
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
40+
- name: Package vscode-devfile
41+
run: |
42+
vsce package -o vscode-devfile-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
43+
ls -lash *.vsix
44+
- name: Upload VSIX Artifacts
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: vscode-devfile
48+
path: |
49+
vscode-devfile-${{ env.EXT_VERSION }}-${{ github.run_number }}.vsix
50+
if-no-files-found: error
51+
- name: Publish to GH Release Tab
52+
if: ${{ inputs.publishToMarketPlace == 'true' && inputs.publishToOVSX == 'true' }}
53+
uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0"
54+
with:
55+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
56+
automatic_release_tag: "v${{ env.EXT_VERSION }}"
57+
title: "${{ env.EXT_VERSION }}"
58+
draft: true
59+
files: |
60+
vscode-devfile-${{ env.EXT_VERSION }}-${{ github.run_number }}.vsix
61+
release-job:
62+
environment: ${{ (inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true') && 'release' || 'pre-release' }}
63+
runs-on: ubuntu-latest
64+
needs: packaging-job
65+
steps:
66+
- name: Set Up NodeJS
67+
uses: actions/setup-node@v2
68+
with:
69+
node-version: "18"
70+
- name: Install dependencies
71+
run: |
72+
npm install -g typescript "@vscode/vsce" "ovsx"
73+
- name: Download VSIX
74+
uses: actions/download-artifact@v3
75+
- name: Publish to VS Code Marketplace
76+
if: ${{ inputs.publishToMarketPlace == 'true' }}
77+
run: |
78+
vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath vscode-walkthrough-extension/vscode-devfile-*-${GITHUB_RUN_NUMBER}.vsix
79+
- name: Publish to OpenVSX Registry
80+
if: ${{ inputs.publishToOVSX == 'true' == 'true' }}
81+
run: |
82+
ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --packagePath vscode-walkthrough-extension/vscode-devfile-*-${GITHUB_RUN_NUMBER}.vsix

.vscodeignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ vsc-extension-quickstart.md
88
**/.eslintrc.json
99
**/*.map
1010
**/*.ts
11+
node_modules

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
All notable changes to the "redhat.vscode-devfile" extension will be documented in this file.
3+
All notable changes to the "devfile.vscode-devfile" extension will be documented in this file.
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Contribute to VS Code Devfile extension
33

44
### Step 1 : Open this repository in an Eclipse Che cloud development environment
55

6-
Use this GitHub repository URL in Eclipse Che Dashboard or in a direct link `https://<che-hostname>/#https://github.com/vitaliy-guliy/vscode-devfile/`.
6+
Use this GitHub repository URL in Eclipse Che Dashboard or in a direct link `https://<che-hostname>/#https://github.com/devfile/vscode-walkthrough-extension/`.
77

88
Click on the link below to open it in Red Hat Developer Sandbox:
99

10-
[![Contribute](https://img.shields.io/static/v1?label=Open%20in%20Red%20Hat%20Developer%20Sandbox...&message=Free%20as%20free%20🍺%20and%20free%20💬..&logo=eclipseche&color=FDB940&labelColor=525C86)](https://workspaces.openshift.com#https://github.com/vitaliy-guliy/vscode-devfile/)
10+
[![Contribute](https://img.shields.io/static/v1?label=Open%20in%20Red%20Hat%20Developer%20Sandbox...&message=Free%20as%20free%20🍺%20and%20free%20💬..&logo=eclipseche&color=FDB940&labelColor=525C86)](https://workspaces.openshift.com#https://github.com/devfile/vscode-walkthrough-extension/)
1111

1212
### Step 2 : Compile extension
1313

@@ -38,7 +38,7 @@ In a terminal you may be warned with a message below:
3838
3939
Just type `y` to the terminal and press `Enter` to confirm the build.
4040

41-
When build finished, a new file `redhat-vscode-devfile-0.0.1.vsix` will appear in the project root.
41+
When build finished, a new file `devfile-vscode-devfile-0.0.1.vsix` will appear in the project root.
4242

4343
The file can be downloaded and used in other local or remote VS Code instances.
4444

0 commit comments

Comments
 (0)