Skip to content

Commit

Permalink
Merge pull request #1 from boostercloud/packaging
Browse files Browse the repository at this point in the history
Automatic packaging
  • Loading branch information
NickSeagull authored Feb 20, 2024
2 parents 3b509ff + caf83c6 commit 7a28c65
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 7 deletions.
79 changes: 74 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,31 @@ jobs:
with:
node-version: 18

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build
run: npm run compile
- name: Compile
run: pnpm compile
working-directory: apps/extension

release:
runs-on: ubuntu-latest
Expand All @@ -27,9 +47,58 @@ jobs:
with:
node-version: 18

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm ci
run: |
pnpm install
pnpm i -g @vscode/vsce
- run: npx semantic-release
- name: Compile
run: pnpm compile
working-directory: apps/extension
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Generate VSIX
run: pnpm vsce package --no-dependencies
working-directory: apps/extension

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}-prelease
release_name: Release ${{ github.ref }} (prelease)
draft: false
prerelease: true
- uses: xresloader/upload-to-github-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.vsix"
delete_file: "*.vsix"
release_id: ${{ steps.create_release.outputs.id }}
overwrite: true
verbose: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ yarn-error.log*
# Misc
.DS_Store
*.pem


*.vsix
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ALL RIGHTS RESERVED - The Agile Monkeys S.L
8 changes: 6 additions & 2 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"description": "Booster Tutor",
"version": "0.0.1",
"engines": {
"vscode": "^1.74.0"
"vscode": "^1.77.0"
},
"repository": {
"type": "git",
"url": "https://github.com/boostercloud/booster-tutor"
},
"categories": [
"Other"
Expand Down Expand Up @@ -50,7 +54,7 @@
"watch": "concurrently \"pnpm run watch:extension\" \"pnpm run watch:webview\"",
"watch:extension": "pnpm run compile:extension --watch",
"watch:webview": "pnpm run compile:webview --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"package": "concurrently \"pnpm run compile:extension --mode production --devtool hidden-source-map\" \"pnpm run compile:webview --mode production --devtool hidden-source-map\"",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
Expand Down

0 comments on commit 7a28c65

Please sign in to comment.