Improve the nightly and release workflow (#836)
* fix: improve the nightly and release workflow * Update .github/workflows/nightly.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix from code review * add type module to node-serial --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -86,8 +86,7 @@ jobs:
|
|||||||
containerfiles: |
|
containerfiles: |
|
||||||
./packages/web/infra/Containerfile
|
./packages/web/infra/Containerfile
|
||||||
image: ${{ env.REGISTRY_IMAGE }}
|
image: ${{ env.REGISTRY_IMAGE }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tag }}
|
||||||
working-directory: packages/web
|
|
||||||
oci: true
|
oci: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
labels: |
|
labels: |
|
||||||
@@ -95,16 +94,16 @@ jobs:
|
|||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
org.opencontainers.image.created=${{ github.event.head_commit.timestamp }}
|
org.opencontainers.image.created=${{ github.event.head_commit.timestamp }}
|
||||||
|
|
||||||
|
|
||||||
- name: Push To GHCR
|
- name: Push To GHCR
|
||||||
id: push-to-registry
|
id: push-to-registry
|
||||||
uses: redhat-actions/push-to-registry@v2
|
uses: redhat-actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
image: ${{ steps.build-container.outputs.image }}
|
image: ${{ steps.build-container.outputs.image }}
|
||||||
tags: ${{ steps.build-container.outputs.tags }}
|
tags: ${{ steps.build-container.outputs.tags || steps.meta.outputs.tag }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
- name: Print image URL
|
- name: Print image URL
|
||||||
run: echo "Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}"
|
run: echo "Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}"
|
||||||
|
|||||||
@@ -4,16 +4,22 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
packages:
|
packages:
|
||||||
description: 'Packages to release (comma-separated, or "all" for all packages)'
|
description: 'Packages to release (comma-separated, or "all")'
|
||||||
required: false
|
required: false
|
||||||
default: 'all'
|
default: 'all'
|
||||||
|
bump:
|
||||||
|
description: 'Semver bump (patch | minor | major)'
|
||||||
|
required: false
|
||||||
|
default: 'patch'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write # we commit the bumped versions back
|
||||||
id-token: write # <-- required for JSR OIDC
|
id-token: write # required for JSR OIDC
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -29,21 +35,16 @@ jobs:
|
|||||||
node-version: 22
|
node-version: 22
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
cache-dependency-path: '**/pnpm-lock.yaml'
|
cache-dependency-path: '**/pnpm-lock.yaml'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Configure npm auth
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
run: |
|
|
||||||
pnpm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
|
|
||||||
pnpm config set registry https://registry.npmjs.org/
|
|
||||||
|
|
||||||
- name: Resolve package list
|
- name: Resolve package list
|
||||||
id: pkgs
|
id: pkgs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
if [ "${{ github.event.inputs.packages }}" = "all" ] || [ -z "${{ github.event.inputs.packages }}" ]; then
|
if [ "${{ github.event.inputs.packages }}" = "all" ] || [ -z "${{ github.event.inputs.packages }}" ]; then
|
||||||
mapfile -t TARGETS < <(ls -d packages/* | grep -v 'packages/web')
|
mapfile -t TARGETS < <(ls -d packages/* | grep -v 'packages/web')
|
||||||
else
|
else
|
||||||
@@ -52,61 +53,91 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
printf '%s\n' "${TARGETS[@]}" | paste -sd, - > targets.txt
|
printf '%s\n' "${TARGETS[@]}" | paste -sd, - > targets.txt
|
||||||
echo "list=$(cat targets.txt)" >> "$GITHUB_OUTPUT"
|
echo "list=$(cat targets.txt)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Targets: $(cat targets.txt)"
|
||||||
|
|
||||||
- name: Build selected packages (tsdown)
|
- name: Bump package.json versions (no git tag)
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
BUMP="${{ github.event.inputs.bump }}"
|
||||||
|
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
||||||
|
for dir in "${TARGETS[@]}"; do
|
||||||
|
if [ -f "$dir/package.json" ]; then
|
||||||
|
echo "Bumping $dir -> $BUMP"
|
||||||
|
(cd "$dir" && npm version "$BUMP" --no-git-tag-version --allow-same-version)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Generate jsr.json from package.json (pkg-to-jsr)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
||||||
|
for dir in "${TARGETS[@]}"; do
|
||||||
|
if [ -f "$dir/package.json" ]; then
|
||||||
|
echo "Generating jsr.json for $dir"
|
||||||
|
pnpm dlx pkg-to-jsr --root "$dir"
|
||||||
|
# # Optional: show result
|
||||||
|
# jq -C . "$dir/jsr.json" || cat "$dir/jsr.json"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
- name: Commit version bumps
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add packages/*/package.json packages/*/jsr.json 2>/dev/null || true
|
||||||
|
if ! git diff --cached --quiet; then
|
||||||
|
git commit -m "chore(release): bump package versions (${{ github.event.inputs.bump }})"
|
||||||
|
git push
|
||||||
|
else
|
||||||
|
echo "No changes to commit."
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build selected packages
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
||||||
for dir in "${TARGETS[@]}"; do
|
for dir in "${TARGETS[@]}"; do
|
||||||
echo "Building $dir"
|
echo "Building $dir"
|
||||||
pnpm --filter "./$dir" run build
|
pnpm --filter "./$dir" run build
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Sync jsr.json version from package.json
|
|
||||||
run: |
|
|
||||||
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
|
||||||
for dir in "${TARGETS[@]}"; do
|
|
||||||
if [ -f "$dir/jsr.json" ] && [ -f "$dir/package.json" ]; then
|
|
||||||
PKG_VER=$(jq -r .version "$dir/package.json")
|
|
||||||
jq --arg v "$PKG_VER" '.version = $v' "$dir/jsr.json" > "$dir/jsr.json.tmp" && mv "$dir/jsr.json.tmp" "$dir/jsr.json"
|
|
||||||
echo "Updated $dir/jsr.json to version $PKG_VER"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish to JSR (OIDC)
|
- name: Publish to JSR (OIDC)
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
||||||
for dir in "${TARGETS[@]}"; do
|
for dir in "${TARGETS[@]}"; do
|
||||||
if [ -f "$dir/jsr.json" ]; then
|
if [ -f "$dir/jsr.json" ]; then
|
||||||
echo "Publishing $dir to JSR via OIDC…"
|
echo "Publishing $dir to JSR via OIDC…"
|
||||||
cd "$dir"
|
( cd "$dir"
|
||||||
[ -d dist ] || pnpm run build
|
[ -d dist ] || pnpm run build
|
||||||
if ! npx --yes jsr publish 2>&1 | tee jsr_publish.log; then
|
npx --yes jsr publish
|
||||||
echo "JSR publish failed for $dir. Error output:"
|
)
|
||||||
cat jsr_publish.log
|
|
||||||
fi
|
|
||||||
cd - >/dev/null
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Replace exports entry in package.json
|
- name: Configure npm auth
|
||||||
run: |
|
run: |
|
||||||
tmp=$(mktemp)
|
pnpm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
|
||||||
jq '.exports["."] = "./dist/mod.mjs"' package.json > "$tmp" \
|
pnpm config set registry https://registry.npmjs.org/
|
||||||
&& mv "$tmp" package.json
|
|
||||||
|
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
IFS=',' read -ra TARGETS <<< "${{ steps.pkgs.outputs.list }}"
|
||||||
for dir in "${TARGETS[@]}"; do
|
for dir in "${TARGETS[@]}"; do
|
||||||
if [ -f "$dir/package.json" ]; then
|
if [ -f "$dir/package.json" ]; then
|
||||||
echo "Publishing $dir to npm…"
|
echo "Publishing $dir to npm…"
|
||||||
cd "$dir"
|
( cd "$dir"
|
||||||
[ -d dist ] || pnpm run build
|
[ -d dist ] || pnpm run build
|
||||||
npm publish --access public || echo "npm publish failed for $dir"
|
npm publish --access public
|
||||||
cd - >/dev/null
|
)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,38 +30,11 @@ jobs:
|
|||||||
release-web:
|
release-web:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# For manual runs, allow building a chosen ref (branch/tag/SHA)
|
|
||||||
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
|
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
|
||||||
|
|
||||||
- name: Determine tag & latest flag
|
|
||||||
id: meta
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
# Determine TAG
|
|
||||||
if [ "${{ github.event_name }}" = "release" ]; then
|
|
||||||
TAG="${{ github.event.release.tag_name }}"
|
|
||||||
# Push "latest" only for full releases (not prereleases)
|
|
||||||
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
|
|
||||||
PUSH_LATEST="false"
|
|
||||||
else
|
|
||||||
PUSH_LATEST="true"
|
|
||||||
fi
|
|
||||||
elif [ -n "${{ inputs.tag_name }}" ]; then
|
|
||||||
TAG="${{ inputs.tag_name }}"
|
|
||||||
PUSH_LATEST="false"
|
|
||||||
else
|
|
||||||
SHA="$(git rev-parse --short=12 HEAD)"
|
|
||||||
TAG="adhoc-${SHA}"
|
|
||||||
PUSH_LATEST="false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "push_latest=$PUSH_LATEST" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "Resolved tag: $TAG (push_latest=$PUSH_LATEST)"
|
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
@@ -81,63 +54,62 @@ jobs:
|
|||||||
working-directory: packages/web
|
working-directory: packages/web
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Create Web App Release Archive
|
- name: Create release archive
|
||||||
working-directory: packages/web
|
working-directory: packages/web
|
||||||
run: pnpm run package
|
run: pnpm run package
|
||||||
|
|
||||||
- name: Upload Web App Archive (artifact)
|
- name: Upload archive (artifact)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: web-build-${{ steps.meta.outputs.tag }}
|
name: web-build
|
||||||
if-no-files-found: error
|
|
||||||
path: packages/web/dist/build.tar
|
path: packages/web/dist/build.tar
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Attach Web Archive to GitHub Release
|
- name: Attach archive to GitHub Release
|
||||||
if: ${{ github.event_name == 'release' || inputs.attach_to_release == true }}
|
if: ${{ github.event_name == 'release' || inputs.attach_to_release == true }}
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: packages/web/dist/build.tar
|
||||||
|
tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag_name }}
|
||||||
|
fail_on_unmatched_files: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
|
||||||
run: |
|
- name: Docker metadata (tags & labels)
|
||||||
if [ "${{ github.event_name }}" = "release" ]; then
|
id: meta
|
||||||
TAG="${{ steps.meta.outputs.tag }}"
|
uses: docker/metadata-action@v5
|
||||||
else
|
with:
|
||||||
if [ -z "${{ inputs.tag_name }}" ]; then
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
echo "attach_to_release requested but no tag_name provided." >&2
|
tags: |
|
||||||
exit 1
|
# For release events, use the release tag (e.g. v1.2.3)
|
||||||
fi
|
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
|
||||||
TAG="${{ inputs.tag_name }}"
|
# For manual runs with a provided tag_name
|
||||||
fi
|
type=raw,value=${{ inputs.tag_name }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.tag_name != '' }}
|
||||||
gh release upload "$TAG" packages/web/dist/build.tar --clobber
|
# For manual runs without tag_name, fall back to adhoc-<shortsha>
|
||||||
|
type=sha,format=short,prefix=adhoc-,enable=${{ github.event_name == 'workflow_dispatch' && inputs.tag_name == '' }}
|
||||||
|
# Add "latest" only for full releases (not prereleases)
|
||||||
|
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Build Container Image
|
- name: Set up Buildx
|
||||||
id: build-container
|
uses: docker/setup-buildx-action@v3
|
||||||
uses: redhat-actions/buildah-build@v2
|
|
||||||
|
- name: Build and (maybe) push image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
containerfiles: |
|
context: .
|
||||||
./packages/web/infra/Containerfile
|
file: ./packages/web/infra/Containerfile
|
||||||
image: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: latest,${{ steps.meta.outputs.tag }}
|
|
||||||
oci: true
|
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Push Container to GHCR
|
- name: Output image refs
|
||||||
id: push-to-registry
|
|
||||||
if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
||||||
uses: redhat-actions/push-to-registry@v2
|
run: "echo \"🖼️ Pushed: ${{ steps.meta.outputs.tags }}\""
|
||||||
with:
|
|
||||||
image: ${{ steps.build-container.outputs.image }}
|
|
||||||
tags: ${{ steps.build-container.outputs.tags }}
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Output Image URL
|
- name: Explain no image push
|
||||||
if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
|
||||||
run: echo "🖼️ Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}"
|
|
||||||
|
|
||||||
- name: Explain no image URL
|
|
||||||
if: ${{ !(github.event_name == 'release' && github.event.release.prerelease == false) }}
|
if: ${{ !(github.event_name == 'release' && github.event.release.prerelease == false) }}
|
||||||
run: echo "ℹ️ No image pushed (this was a prerelease or manual run)."
|
run: echo "ℹ️ No image pushed (prerelease or manual run)."
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
".": "./mod.ts"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"tsdown": {
|
"tsdown": {
|
||||||
"entry": "mod.ts",
|
"entry": "mod.ts",
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": "./mod.ts"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"tsdown": {
|
"tsdown": {
|
||||||
"entry": "mod.ts",
|
"entry": "mod.ts",
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
"LICENSE",
|
"LICENSE",
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"tsdown": {
|
"tsdown": {
|
||||||
"entry": "mod.ts",
|
"entry": "mod.ts",
|
||||||
|
|||||||
@@ -3,12 +3,18 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "NodeJS-specific serial transport layer for Meshtastic web applications.",
|
"description": "NodeJS-specific serial transport layer for Meshtastic web applications.",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/mod.mjs"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"main": "./dist/mod.mjs",
|
"type": "module",
|
||||||
"module": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"module": "./dist/mod.js",
|
||||||
|
"types": "./dist/mod.d.ts",
|
||||||
|
"files": [
|
||||||
|
"package.json",
|
||||||
|
"README.md",
|
||||||
|
"LICENSE",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"tsdown": {
|
"tsdown": {
|
||||||
"entry": "mod.ts",
|
"entry": "mod.ts",
|
||||||
@@ -19,12 +25,6 @@
|
|||||||
"splitting": false,
|
"splitting": false,
|
||||||
"clean": true
|
"clean": true
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"package.json",
|
|
||||||
"README.md",
|
|
||||||
"LICENSE",
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepack": "cp ../../LICENSE ./LICENSE",
|
"prepack": "cp ../../LICENSE ./LICENSE",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
".": "./mod.ts"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
|
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"tsdown": {
|
"tsdown": {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
".": "./mod.ts"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"package.json",
|
"package.json",
|
||||||
"README.md",
|
"README.md",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
".": "./mod.ts"
|
".": "./mod.ts"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/mod.mjs",
|
"main": "./dist/mod.js",
|
||||||
"module": "./dist/mod.mjs",
|
"module": "./dist/mod.js",
|
||||||
"types": "./dist/mod.d.mts",
|
"types": "./dist/mod.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"package.json",
|
"package.json",
|
||||||
"README.md",
|
"README.md",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.29.1-alpine-slim
|
||||||
|
|
||||||
RUN rm -r /usr/share/nginx/html \
|
RUN rm -r /usr/share/nginx/html \
|
||||||
&& mkdir -p /usr/share/nginx/html \
|
&& mkdir -p /usr/share/nginx/html \
|
||||||
@@ -6,9 +6,9 @@ RUN rm -r /usr/share/nginx/html \
|
|||||||
|
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
|
|
||||||
ADD ./dist .
|
ADD ./packages/web/dist .
|
||||||
|
|
||||||
COPY ./infra/default.conf /etc/nginx/conf.d/default.conf
|
COPY ./packages/web/infra/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user