-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Build extension" workflow (#11)
- Loading branch information
1 parent
fd9f444
commit eac013f
Showing
2 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,30 +19,13 @@ jobs: | |
with: | ||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit | ||
fetch-depth: 0 # a full history is required for pull request analysis | ||
- name: Detect package manager | ||
id: detect-package-manager | ||
run: | | ||
if [ -f "${{ github.workspace }}/yarn.lock" ]; then | ||
echo "manager=yarn" >> $GITHUB_OUTPUT | ||
echo "command=install" >> $GITHUB_OUTPUT | ||
echo "runner=yarn" >> $GITHUB_OUTPUT | ||
exit 0 | ||
elif [ -f "${{ github.workspace }}/package.json" ]; then | ||
echo "manager=npm" >> $GITHUB_OUTPUT | ||
echo "command=ci" >> $GITHUB_OUTPUT | ||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT | ||
exit 0 | ||
else | ||
echo "Unable to determine package manager" | ||
exit 1 | ||
fi | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: ${{ steps.detect-package-manager.outputs.manager }} | ||
cache: npm | ||
- name: Install dependencies | ||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
run: npm ci | ||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Extension | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: # Specify your branches here | ||
- main # The 'main' branch | ||
- 'releases/*' # The release branches | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit | ||
fetch-depth: 0 # a full history is required for pull request analysis | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build |