Skip to content

Commit eb8621b

Browse files
Merge pull request #43 from HealthIntersections/2026-02-gg-release-prep
prep for release
2 parents ab7b363 + 4ca1ca5 commit eb8621b

8 files changed

Lines changed: 162 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: '20'
20+
node-version: '24'
2121
cache: 'npm'
2222

2323
- name: Install dependencies

.github/workflows/pr-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: '20'
20+
node-version: '24'
2121
cache: 'npm'
2222

2323
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Use Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '20'
19+
node-version: '24'
2020
cache: 'npm'
2121

2222
- name: Install dependencies
@@ -84,11 +84,46 @@ jobs:
8484
draft: false
8585
prerelease: false
8686
token: ${{ secrets.GITHUB_TOKEN }}
87+
88+
npm-publish:
89+
name: Publish to NPM
90+
runs-on: ubuntu-latest
91+
needs: test
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
- name: Use Node.js
97+
uses: actions/setup-node@v4
98+
with:
99+
node-version: '20'
100+
cache: 'npm'
101+
registry-url: 'https://registry.npmjs.org'
102+
103+
- name: Install dependencies
104+
run: npm ci
87105

88-
docker:
106+
- name: Get version from tag
107+
id: get_version
108+
run: |
109+
VERSION=${GITHUB_REF#refs/tags/v}
110+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
111+
112+
- name: Update package.json version
113+
run: npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
114+
115+
- name: Publish to npm
116+
run: npm publish --access public
117+
env:
118+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
119+
120+
docker:
89121
name: Build and Push Docker Image
90122
runs-on: ubuntu-latest
91123
needs: release
124+
permissions:
125+
contents: read
126+
packages: write
92127

93128
steps:
94129
- uses: actions/checkout@v4
@@ -100,6 +135,9 @@ jobs:
100135
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
101136
echo "VERSION_NO_V=${VERSION#v}" >> $GITHUB_OUTPUT
102137
138+
- name: Set lowercase repository name
139+
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
140+
103141
- name: Set up Docker Buildx
104142
uses: docker/setup-buildx-action@v3
105143

@@ -116,10 +154,11 @@ jobs:
116154
context: .
117155
push: true
118156
tags: |
119-
ghcr.io/${{ github.repository }}:latest
120-
ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION }}
121-
ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION_NO_V }}
157+
ghcr.io/${{ env.REPO_LC }}:latest
158+
ghcr.io/${{ env.REPO_LC }}:${{ steps.get_version.outputs.VERSION }}
159+
ghcr.io/${{ env.REPO_LC }}:${{ steps.get_version.outputs.VERSION_NO_V }}
122160
cache-from: type=gha
123161
cache-to: type=gha,mode=max
124162
build-args: |
125163
VERSION=${{ steps.get_version.outputs.VERSION_NO_V }}
164+

.npmignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Development files
2+
.git/
3+
.github/
4+
.gitignore
5+
.eslintrc*
6+
.prettierrc*
7+
jest.config.js
8+
nodemon.json
9+
10+
# Test files
11+
test/
12+
tests/
13+
__tests__/
14+
*.test.js
15+
*.spec.js
16+
test-results/
17+
coverage/
18+
19+
# Data and runtime files
20+
data/
21+
tx/data/
22+
logs/
23+
*.log
24+
*.sqlite
25+
26+
# Build artifacts
27+
node_modules/
28+
.npm/
29+
*.tgz
30+
31+
# IDE and OS files
32+
.idea/
33+
.vscode/
34+
*.swp
35+
*.swo
36+
.DS_Store
37+
Thumbs.db
38+
39+
# Docker files (not needed for npm)
40+
Dockerfile
41+
docker-compose*.yml
42+
.dockerignore
43+
44+
# CI/CD
45+
.travis.yml
46+
.circleci/
47+
azure-pipelines.yml
48+
49+
# Documentation source (keep compiled)
50+
docs/

README.md

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,65 @@ hack that.
197197

198198
This project follows [Semantic Versioning](https://semver.org/) and uses a [CHANGELOG.md](CHANGELOG.md) file to track changes.
199199

200-
To create a new release:
200+
### What's in a Release
201201

202-
1. Update CHANGELOG.md with your changes under a new version section
203-
2. Commit your changes
204-
3. Tag the commit with the new version: `git tag vX.Y.Z`
205-
4. Push the tag: `git push origin vX.Y.Z`
202+
Each GitHub Release includes:
203+
- **Release notes** extracted from CHANGELOG.md
204+
- **Source code** archives (zip and tar.gz)
205+
- **Docker images** pushed to GitHub Container Registry:
206+
- `ghcr.io/healthintersections/fhirsmith:latest`
207+
- `ghcr.io/healthintersections/fhirsmith:vX.Y.Z`
208+
- `ghcr.io/healthintersections/fhirsmith:X.Y.Z`
209+
- **npm package** published to npmjs.org as `fhirsmith` *(if you add this)*
210+
211+
### Creating a Release
206212

207213
GitHub Actions will automatically:
208214
- Run tests
209215
- Create a GitHub Release with notes from CHANGELOG.md
210216
- Build and publish Docker images with appropriate tags
211217

218+
**Prerequisites:**
219+
- All tests passing on main branch
220+
- CHANGELOG.md updated with changes
221+
222+
**Steps:**
223+
1. Update `CHANGELOG.md` with your changes under a new version section:
224+
```markdown
225+
## [vX.Y.Z] - YYYY-MM-DD
226+
### Added
227+
- New feature description
228+
### Changed
229+
- Change description
230+
### Fixed
231+
- Bug fix description
232+
```
233+
234+
2. Commit your changes:
235+
```bash
236+
git add CHANGELOG.md
237+
git commit -m "Prepare release vX.Y.Z"
238+
git push origin main
239+
```
240+
241+
3. Tag and push the release:
242+
```bash
243+
git tag vX.Y.Z
244+
git push origin vX.Y.Z
245+
```
246+
247+
4. Monitor the release:
248+
- Check [GitHub Actions](https://github.com/HealthIntersections/fhirsmith/actions) for the Release workflow
249+
- Verify the [GitHub Release](https://github.com/HealthIntersections/fhirsmith/releases) was created
250+
- Confirm Docker images are available at [GHCR](https://github.com/HealthIntersections/fhirsmith/pkgs/container/fhirsmith)
251+
252+
**If a release fails:**
253+
- Delete the tag: `git tag -d vX.Y.Z && git push origin :refs/tags/vX.Y.Z`
254+
- Fix the issue
255+
- Re-tag and push
256+
257+
### Creating a Release
258+
212259
## License
213260

214261
[BSD-3](https://opensource.org/license/bsd-3-clause)

package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,22 @@
9898
"smart-health-link",
9999
"smart-health-card"
100100
],
101-
"author": "",
102-
"license": "MIT",
101+
"author": "Health Intersections Pty Ltd",
102+
"license": "BSD-3",
103103
"overrides": {
104104
"tar": "^7.5.7",
105105
"fast-xml-parser": "^5.3.4"
106106
},
107107
"bin": {
108-
"tx-import": "./tx-import.js"
109-
}
108+
"tx-import": "./tx-import.js",
109+
"fhirsmith": "./server.js"
110+
},
111+
"repository": {
112+
"type": "git",
113+
"url": "git+https://github.com/HealthIntersections/fhirsmith.git"
114+
},
115+
"bugs": {
116+
"url": "https://github.com/HealthIntersections/fhirsmith/issues"
117+
},
118+
"homepage": "https://github.com/HealthIntersections/fhirsmith#readme"
110119
}

server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env node
12
//
23
// Copyright 2025, Health Intersections Pty Ltd (http://www.healthintersections.com.au)
34
//

tx/incoming.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)