Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Integrating release workflow - initial build, test, package, and upload artifacts to the ci runs. #34

Merged
merged 44 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e617459
adding intial release workflow
savitharaghunathan Sep 27, 2024
621028a
Merge pull request #1 from savitharaghunathan/release_automation
savitharaghunathan Sep 27, 2024
d818cd9
fix errors
savitharaghunathan Sep 27, 2024
978688d
trial 1
savitharaghunathan Sep 27, 2024
63fca97
Revert ":sparkles: adding initial release workflow"
savitharaghunathan Sep 27, 2024
b1a30bb
update readme
savitharaghunathan Sep 27, 2024
d35087a
generate vsix fix
savitharaghunathan Sep 27, 2024
08d0239
updating .vscodeignore file
savitharaghunathan Sep 30, 2024
45b103c
updating the way vsce package runs
savitharaghunathan Sep 30, 2024
afa20c4
Merge pull request #2 from savitharaghunathan/revert-1-release_automa…
savitharaghunathan Sep 30, 2024
f34b8f5
adding readme back
savitharaghunathan Sep 30, 2024
72b89ff
updating readme to avoid the vsce package error
savitharaghunathan Sep 30, 2024
3c8f986
Merge branch 'konveyor:main' into main
savitharaghunathan Sep 30, 2024
622c7e6
sync upstream barnch
savitharaghunathan Sep 30, 2024
51ee332
Merge pull request #3 from savitharaghunathan/release_automation
savitharaghunathan Sep 30, 2024
f683956
Integrating release workflow - initial build, test, package, and uplo…
savitharaghunathan Sep 30, 2024
5f0bfac
Add feedback from reviews
savitharaghunathan Sep 30, 2024
81f3354
Merge branch 'main' into release_auto
savitharaghunathan Sep 30, 2024
0ff04f8
Merge pull request #4 from savitharaghunathan/release_auto
savitharaghunathan Sep 30, 2024
1533cae
testing alternative workflow
savitharaghunathan Sep 30, 2024
df8c368
Merge pull request #5 from savitharaghunathan/release_auto
savitharaghunathan Sep 30, 2024
8fe7317
overwrite latest releases
savitharaghunathan Sep 30, 2024
9c25446
Merge pull request #6 from savitharaghunathan/release_auto
savitharaghunathan Sep 30, 2024
a700bb9
try a new action
savitharaghunathan Sep 30, 2024
e958073
Merge pull request #7 from savitharaghunathan/release_auto
savitharaghunathan Sep 30, 2024
571b43d
switching back to archived action
savitharaghunathan Sep 30, 2024
9ff2de0
Merge pull request #8 from savitharaghunathan/release_auto
savitharaghunathan Sep 30, 2024
a6d58e9
reconciling release and ci workflow
savitharaghunathan Oct 1, 2024
1a50dc0
cleanup
savitharaghunathan Oct 1, 2024
6cb30ab
Merge pull request #9 from savitharaghunathan/release_auto
savitharaghunathan Oct 1, 2024
28f40f2
update action to release
savitharaghunathan Oct 1, 2024
cb449e7
Merge pull request #10 from savitharaghunathan/release_auto
savitharaghunathan Oct 1, 2024
cd3a947
Delete .github/workflows/ci-repo.yml
savitharaghunathan Oct 1, 2024
e2fa7ec
try a new action
savitharaghunathan Sep 30, 2024
aba0af3
update action
savitharaghunathan Oct 1, 2024
b93c597
resolve conflicts
savitharaghunathan Oct 1, 2024
80e6355
update action
savitharaghunathan Oct 1, 2024
b0cbe77
updating tag name
savitharaghunathan Oct 1, 2024
547d1fc
adding cache stuff back
savitharaghunathan Oct 2, 2024
19823ed
Merge remote-tracking branch 'upstream/main' into release_auto
savitharaghunathan Oct 2, 2024
2df3757
adding review feedback
savitharaghunathan Oct 2, 2024
ee5b896
bumping node version to avoid moudule not found error
savitharaghunathan Oct 2, 2024
9a0bd48
updating the release job
savitharaghunathan Oct 3, 2024
6170e60
add missing working dir
savitharaghunathan Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 155 additions & 29 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,48 @@ on:
branches:
- "main"
- "release-*"

workflow_dispatch:
inputs:
shouldRelease:
description: 'Should a release be created?'
required: false
default: 'false'

workflow_call:
savitharaghunathan marked this conversation as resolved.
Show resolved Hide resolved

inputs:
shouldRelease:
type: boolean
description: 'Should a release be created?'
required: false
default: false


concurrency:
group: ci-repo-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
package-tests:
runs-on: ubuntu-latest
build:
name: Build (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows
max-parallel: 3

steps:
- name: Check-out repository
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Use Node.js from .nvmrc
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"
Expand All @@ -39,43 +63,145 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }}

- name: Install dependencies
working-directory: ./vscode
run: |
cd vscode
npm version
npm ci

- name: Lint sources
run: |
cd vscode
npm run lint
working-directory: ./vscode
run: npm run lint

test:
name: Test (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"

- name: Install dependencies
working-directory: ./vscode
run: npm ci

# Run tests on Linux
- name: Run tests (Linux)
if: matrix.arch == 'linux'
working-directory: ./vscode
run:
xvfb-run -a npm run test

# Run tests on macOS
- name: Run tests (macOS)
if: matrix.arch == 'macos'
working-directory: ./vscode
run: npm test

# Run tests on Windows
- name: Run tests (Windows)
if: matrix.arch == 'windows'
working-directory: ./vscode
shell: cmd
run: npm test

package:
name: Package (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: test
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows
max-parallel: 3

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"

- name: Install dependencies
working-directory: ./vscode
run: npm ci

- name: Build Package
working-directory: ./vscode
run: npm run package

- name: Generate .vsix package
working-directory: ./vscode
run: |
cd vscode
npm run package
npm install @vscode/vsce
npx vsce package

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension-${{ matrix.arch }}
path: "vscode/*.vsix"

vscode-tests:
release:
name: Release
runs-on: ubuntu-latest
needs: package
if: |
github.ref == 'refs/heads/main' &&
(github.event.inputs.shouldRelease == 'true' || github.event.inputs.shouldRelease == true)

steps:
- name: Check-out repository
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js from .nvmrc
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"

- name: Cache extension node_modules
uses: actions/cache@v3
- name: Download VSIX artifacts
uses: actions/download-artifact@v3
with:
path: vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }}
path: ./artifacts

- run: |
cd vscode
npm ci
- run: |
cd vscode
xvfb-run -a npm run test

- name: Read version from package.json
id: get_version
working-directory: ./vscode
run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT

- name: Generate tag name with timestamp
id: vars
shell: bash
run: |
TAG_NAME="v${{ steps.get_version.outputs.version }}-dev+$(date +%Y%m%d)"
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT

- name: Create Pre-release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.vars.outputs.tag_name }}
commit: ${{ github.sha }}
artifacts: "./artifacts/**/*.vsix"
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/nightly-ci-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ on:
jobs:
nightly:
uses: ./.github/workflows/ci-repo.yml
with:
shouldRelease: true
2 changes: 1 addition & 1 deletion vscode/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.13.0
v20.13.1
3 changes: 2 additions & 1 deletion vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.vscode/**
.vscode-test/**
out/**
test_out/**
node_modules/**
src/**
.gitignore
Expand All @@ -12,3 +12,4 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
**/.vscode-test.*
test_out/*
60 changes: 6 additions & 54 deletions vscode/README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,23 @@
# konveyor-vscode README
# konveyor-vscode

This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections.
This extension allows the user to run Konveyor AI from VSCode.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
TODO

## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.
TODO

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.
TODO

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
TODO

**Enjoy!**
Loading