Skip to content

Commit

Permalink
Merge branch 'main' into cpy
Browse files Browse the repository at this point in the history
  • Loading branch information
conorheffron authored Jan 6, 2025
2 parents 547f5dc + dba3f14 commit a05c306
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -31,14 +30,40 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
registry-url: https://npm.pkg.github.com/
scope: '@conorheffron'
- run: npm ci
working-directory: './frontend'
- run: npm set "//npm.pkg.github.com/:_authToken=$NPM_TOKEN"
working-directory: './frontend'
env:
NPM_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: echo registry=https://npm.pkg.github.com/conorheffron >> .npmrc
working-directory: './frontend'
- run: npm publish
working-directory: './frontend'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

publish-npm:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
- run: npm ci
working-directory: './frontend'
- run: npm set "//registry.npmjs.org/conorheffron/:_authToken=$NPM_TOKEN"
working-directory: './frontend'
env:
NPM_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- run: npm publish --access public
working-directory: './frontend'
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
3 changes: 2 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ The ironoc UI built with react for personal portfolio website.
[![Node.js Package](https://github.com/conorheffron/ironoc/actions/workflows/npm-publish-github-packages.yml/badge.svg)](https://github.com/conorheffron/ironoc/actions/workflows/npm-publish-github-packages.yml)

- See project README.md [here](https://github.com/conorheffron/ironoc/blob/main/README.md)
- See published GitHub package details [here](https://github.com/conorheffron/ironoc/pkgs/npm/ironoc-frontend)
- See npmjs package details here [https://www.npmjs.com/package/@conorheffron/ironoc-frontend](https://www.npmjs.com/package/@conorheffron/ironoc-frontend)
- See GitHub package details here [https://github.com/conorheffron/ironoc/pkgs/npm/ironoc-frontend](https://github.com/conorheffron/ironoc/pkgs/npm/ironoc-frontend)

## Getting Started with React App

Expand Down

0 comments on commit a05c306

Please sign in to comment.