diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 552218e..4487e67 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,12 @@ jobs: - run: npm test - name: Build package run: npm pack + - name: Smoke-test packed artifact + run: | + PACKAGE_TGZ="$(ls ./*.tgz)" + PREFIX="$(mktemp -d)" + npm install --global --prefix "$PREFIX" "$PACKAGE_TGZ" + "$PREFIX/bin/npm-ssl-updater" --help - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} diff --git a/README.en.md b/README.en.md index 8077a81..264cc8f 100644 --- a/README.en.md +++ b/README.en.md @@ -18,19 +18,38 @@ The package and executable retain the historical name `npm-ssl-updater`. ## Installation +Run a tagged version directly from GitHub without cloning the repository: + ```bash -git clone https://github.com/alsd4git/nginx-proxy-manager-ssl-cli.git -cd nginx-proxy-manager-ssl-cli -npm ci +npx -y github:alsd4git/nginx-proxy-manager-ssl-cli#v1.0.0 --help ``` -Run from the checkout with `npm start --`, or install the command globally: +Or install that tagged version globally: ```bash -npm install -g . +npm install -g github:alsd4git/nginx-proxy-manager-ssl-cli#v1.0.0 npm-ssl-updater --help ``` +GitHub Releases also contain the exact `npm pack` tarball for each version. This +is useful when you want to install the published release artifact itself: + +```bash +npm install -g https://github.com/alsd4git/nginx-proxy-manager-ssl-cli/releases/download/v1.0.0/npm-ssl-updater-1.0.0.tgz +``` + +The examples are intentionally pinned to a tag. Replace `v1.0.0` with the +version you want instead of relying on the current default branch. + +For development from a checkout: + +```bash +git clone https://github.com/alsd4git/nginx-proxy-manager-ssl-cli.git +cd nginx-proxy-manager-ssl-cli +npm ci +npm start -- --help +``` + ## Credentials Create `.env` in the directory where you run the command: diff --git a/README.it.md b/README.it.md index 20bf77c..ecb7acb 100644 --- a/README.it.md +++ b/README.it.md @@ -18,20 +18,38 @@ Il pacchetto e il comando mantengono il nome storico `npm-ssl-updater`. ## Installazione +Esegui direttamente una versione taggata da GitHub, senza clonare la repository: + ```bash -git clone https://github.com/alsd4git/nginx-proxy-manager-ssl-cli.git -cd nginx-proxy-manager-ssl-cli -npm ci +npx -y github:alsd4git/nginx-proxy-manager-ssl-cli#v1.0.0 --help ``` -Esegui il tool dal checkout con `npm start --`, oppure installa il comando -globalmente: +Oppure installa globalmente la stessa versione: ```bash -npm install -g . +npm install -g github:alsd4git/nginx-proxy-manager-ssl-cli#v1.0.0 npm-ssl-updater --help ``` +Le GitHub Release contengono anche il tarball esatto prodotto da `npm pack`, +utile se vuoi installare direttamente l'artefatto pubblicato: + +```bash +npm install -g https://github.com/alsd4git/nginx-proxy-manager-ssl-cli/releases/download/v1.0.0/npm-ssl-updater-1.0.0.tgz +``` + +Gli esempi sono intenzionalmente bloccati a un tag. Sostituisci `v1.0.0` con la +versione desiderata invece di affidarti al branch di default corrente. + +Per lo sviluppo da checkout: + +```bash +git clone https://github.com/alsd4git/nginx-proxy-manager-ssl-cli.git +cd nginx-proxy-manager-ssl-cli +npm ci +npm start -- --help +``` + ## Credenziali Crea `.env` nella directory da cui esegui il comando: