File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,31 +11,21 @@ permissions:
1111 packages : write
1212
1313jobs :
14- build_and_push :
14+ publish :
1515 runs-on : ubuntu-latest
1616 steps :
1717 - name : Checkout
1818 uses : actions/checkout@v4
19-
20- - name : Set up Docker Buildx
21- uses : docker/setup-buildx-action@v3
22-
23- - name : Build and export
24- uses : docker/build-push-action@v6
25- env :
26- DOCKER_BUILD_SUMMARY : false
27- with :
28- tags : ghcr.io/decatur-robotics/gearbox:latest
29- outputs : type=docker,dest=/tmp/gearbox.tar
30- context : . # Needed for Docker to find files made during the workflow
31-
32- - name : Load image
19+
20+ - name : Setup Node.js environment
21+ uses : actions/setup-node@v4.1.0
22+
23+ - name : Install dependencies
24+ run : npm install
25+
26+ - name : " Create .npmrc"
3327 run : |
34- docker load --input /tmp/gearbox.tar
35- docker image ls -a
36-
37- - name : Sign in to GHCR
38- run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u decatur-robotics --password-stdin
28+ echo "registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
3929
40- - name : Push to GHCR
41- run : docker push ghcr.io/decatur-robotics/gearbox:latest
30+ - name : Publish package
31+ run : npm publish
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ To get started, use this repo as a template and do the following:
44
55- Update the details in package.json
66- Update the assignees in .github/dependabot.yml
7+ - Add your NPM_TOKEN to the repository secrets
78
89NPM Package Template © 2024 by Decatur Robotics is licensed under CC BY 4.0
You can’t perform that action at this time.
0 commit comments