Skip to content

Commit

Permalink
fix: tryfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganitzsh committed Nov 15, 2023
1 parent 208160e commit 63081eb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
- name: Release
uses: './'
with:
node-module: true
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ outputs:
Released version in format of X.Y.Z (major.minor.patch-prerelease+build).
name: Release me!
runs:
main: dist/index.js
main: bootstrap.mjs
using: node20
13 changes: 13 additions & 0 deletions bootstrap.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { execSync } from 'child_process';

try {
const __dirname = new URL('.', import.meta.url).pathname;
execSync('npm ci --omit=dev --no-audit --no-progress --prefer-offline', {
stdio: 'inherit',
cwd: __dirname,
});

await import('./dist/index.js');
} catch (err) {
console.log(err);
}
2 changes: 1 addition & 1 deletion scripts/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ex

npm --prefix "$1" ci "$1" --only=production --no-audit --no-progress --prefer-offline
npm --prefix "$1" ci "$1" --omit=dev --no-audit --no-progress --prefer-offline

if [ "$#" -gt 1 ]; then
# Install additional packages.
Expand Down

0 comments on commit 63081eb

Please sign in to comment.