Skip to content

Commit

Permalink
Merge pull request #85 from IBM/fix/github-workflows
Browse files Browse the repository at this point in the history
Add `webpack` workflow and extension release workflow
  • Loading branch information
SanjulaGanepola authored Oct 15, 2024
2 parents 08696e3 + 942b19e commit 63983ae
Show file tree
Hide file tree
Showing 10 changed files with 154 additions and 42 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/release-package.yaml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release CLI and Extension

on:
workflow_dispatch:

release:
types: [created]

jobs:
cli:
name: Release CLI

runs-on: ubuntu-latest

permissions:
packages: write
contents: read

defaults:
run:
working-directory: ./cli

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Publish CLI
run: |
npm ci
npm run test
npm run webpack
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

extension:
name: Release Extension

runs-on: ubuntu-latest

permissions:
packages: write
contents: read

defaults:
run:
working-directory: ./vs

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Install NPM Dependencies
run: |
npm install
npm install -g vsce ovsx
- name: Publish to Open VSX
run: npx ovsx publish -p $OPENVSX_TOKEN
env:
OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }}

- name: Publish to Marketplace
run: vsce publish -p $PUBLISHER_TOKEN
env:
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/webpack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: NodeJS with Webpack

on:
workflow_dispatch:

push:
branches: ["main"]
paths:
- 'vs/**'

pull_request:
branches: ["main"]
paths:
- 'vs/**'

jobs:
build:
name: Build and Package

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

defaults:
run:
working-directory: ./vs

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Install NPM Dependencies
run: |
npm install
npm install -g vsce
- name: Build and Package
run: |
npm run webpack
vsce package
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: VSIX
path: ./vs/*.vsix
if-no-files-found: error
4 changes: 2 additions & 2 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ibm/sourceorbit",
"version": "0.11.2",
"version": "1.0.0",
"description": "IBM i dependency management tool",
"bin": {
"so": "./dist/index.js"
Expand Down
8 changes: 4 additions & 4 deletions vs/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vs/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Client",
"author": "IBM",
"license": "MIT",
"version": "0.0.1",
"version": "1.0.0",
"publisher": "vscode",
"engines": {
"vscode": "^1.75.0"
Expand Down
4 changes: 2 additions & 2 deletions vs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"publisher": "IBM",
"license": "MIT",
"version": "1.2.3",
"version": "1.0.0",
"repository": {
"url": "https://github.com/IBM/sourceorbit"
},
Expand Down
4 changes: 2 additions & 2 deletions vs/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 63983ae

Please sign in to comment.