Skip to content

Commit

Permalink
Merge branch 'main' into pc
Browse files Browse the repository at this point in the history
  • Loading branch information
conorheffron authored Dec 31, 2024
2 parents e5f204c + e6d226a commit 250fb69
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
working-directory: './frontend'
- run: npm test
working-directory: './frontend'

publish-gpr:
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://npm.pkg.github.com'
scope: '@conorheffron'
- run: npm ci
working-directory: './frontend'
- run: npm set "//npm.pkg.github.com/:_authToken=$NPM_TOKEN"
env:
NPM_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: npm publish
working-directory: './frontend'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
9 changes: 8 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Getting Started with Create React App
# ironoc-frontend

[![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)

## Getting Started with React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Expand Down
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"name": "@conorheffron/ironoc-frontend",
"version": "5.5.4",
"private": false,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/RepoIssues.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class RepoIssues extends Component {
<td>{issue.body}</td>
</tr>
});
const projectLink = `/projects/${this.props.match.params.id}/`;
return (
<div>
<AppNavbar/><br /><br />
Expand All @@ -62,7 +63,7 @@ class RepoIssues extends Component {
<Button color="primary" variant="outline-secondary" id="button-addon2"
onClick={this.onSubmit}>Search Issues</Button>
</InputGroup>
<h3>Issues for project <b>{this.props.match.params.repo}</b> and account <b>{this.props.match.params.id}</b></h3>
<h3>Issues for project <b>{this.props.match.params.repo}</b> and account <a href={projectLink}><b>{this.props.match.params.id}</b></a></h3>
<Table striped hover bordered>
<thead>
<tr className="table-secondary">
Expand Down

0 comments on commit 250fb69

Please sign in to comment.