Skip to content

Commit

Permalink
chore: add files to publish to registry (#891)
Browse files Browse the repository at this point in the history
## Description

Update the *.d.ts files included in the npm publish to the registry. 

## Related Issue

Fixes #
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
  • Loading branch information
cmwylie19 authored Jun 13, 2024
1 parent 9db7e06 commit 8fef88d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
Dockerfile
Dockerfile.controller
Dockerfile.dist
pepr-upgrade-test
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ jobs:
npm --no-git-tag-version version ${{ github.ref_name }}
# Build Controller Image
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/defenseunicorns/pepr/controller:${{ github.ref_name }} .
docker cp $(docker create --name kim ghcr.io/defenseunicorns/pepr/controller:${{ github.ref_name }}):/app/node_modules/pepr/dist ./dist && docker rm kim
# Build Pepr dist folder for NPM
docker buildx build --tag pepr-npm . -f Dockerfile.dist
docker cp $(docker create --name kim pepr-npm):/app/dist ./dist && docker rm kim
PEPR_VERSION=${{ github.ref_name }} npm publish --provenance --access public
npm publish --provenance --access public
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jest.config.json

/CODEOWNERS
/Dockerfile
/Dockerfile.dist
/insecure*
/tsconfig.*

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### BUILD ###

# NOTE:
# Used to build Controller image
# In this file, we delete the *.ts intentionally
# Any other changes to Dockerfile should be reflected in Publish

# crane digest cgr.dev/chainguard/node-lts:latest-dev
FROM cgr.dev/chainguard/node-lts@sha256:5bcab869041e81dbd3864046ad7a0c230fb3cc505bd8a960f2c288534e40a14f AS build

Expand Down
17 changes: 17 additions & 0 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### NPM PUBLISH ###

# NOTE:
# Used to publish the Pepr dist to the npm registry
# In this file, we keep the *.ts intentionally
# Any other changes to Dockerfile should be reflected in Publish

# crane digest cgr.dev/chainguard/node-lts:latest-dev
FROM cgr.dev/chainguard/node-lts@sha256:5bcab869041e81dbd3864046ad7a0c230fb3cc505bd8a960f2c288534e40a14f AS build

WORKDIR /app

COPY --chown=node:node . .

RUN npm ci

RUN npm run build
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8fef88d

Please sign in to comment.