Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'npm'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'npm'

- name: Install dependencies
Expand Down
49 changes: 44 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'npm'

- name: Install dependencies
Expand Down Expand Up @@ -84,11 +84,46 @@ jobs:
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}

npm-publish:
name: Publish to NPM
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

docker:
- name: Get version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Update package.json version
run: npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

docker:
name: Build and Push Docker Image
runs-on: ubuntu-latest
needs: release
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
Expand All @@ -100,6 +135,9 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION_NO_V=${VERSION#v}" >> $GITHUB_OUTPUT

- name: Set lowercase repository name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -116,10 +154,11 @@ jobs:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION }}
ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION_NO_V }}
ghcr.io/${{ env.REPO_LC }}:latest
ghcr.io/${{ env.REPO_LC }}:${{ steps.get_version.outputs.VERSION }}
ghcr.io/${{ env.REPO_LC }}:${{ steps.get_version.outputs.VERSION_NO_V }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ steps.get_version.outputs.VERSION_NO_V }}

50 changes: 50 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Development files
.git/
.github/
.gitignore
.eslintrc*
.prettierrc*
jest.config.js
nodemon.json

# Test files
test/
tests/
__tests__/
*.test.js
*.spec.js
test-results/
coverage/

# Data and runtime files
data/
tx/data/
logs/
*.log
*.sqlite

# Build artifacts
node_modules/
.npm/
*.tgz

# IDE and OS files
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db

# Docker files (not needed for npm)
Dockerfile
docker-compose*.yml
.dockerignore

# CI/CD
.travis.yml
.circleci/
azure-pipelines.yml

# Documentation source (keep compiled)
docs/
57 changes: 52 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,65 @@ hack that.

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

To create a new release:
### What's in a Release

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

### Creating a Release

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

**Prerequisites:**
- All tests passing on main branch
- CHANGELOG.md updated with changes

**Steps:**
1. Update `CHANGELOG.md` with your changes under a new version section:
```markdown
## [vX.Y.Z] - YYYY-MM-DD
### Added
- New feature description
### Changed
- Change description
### Fixed
- Bug fix description
```

2. Commit your changes:
```bash
git add CHANGELOG.md
git commit -m "Prepare release vX.Y.Z"
git push origin main
```

3. Tag and push the release:
```bash
git tag vX.Y.Z
git push origin vX.Y.Z
```

4. Monitor the release:
- Check [GitHub Actions](https://github.com/HealthIntersections/fhirsmith/actions) for the Release workflow
- Verify the [GitHub Release](https://github.com/HealthIntersections/fhirsmith/releases) was created
- Confirm Docker images are available at [GHCR](https://github.com/HealthIntersections/fhirsmith/pkgs/container/fhirsmith)

**If a release fails:**
- Delete the tag: `git tag -d vX.Y.Z && git push origin :refs/tags/vX.Y.Z`
- Fix the issue
- Re-tag and push

### Creating a Release

## License

[BSD-3](https://opensource.org/license/bsd-3-clause)
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,22 @@
"smart-health-link",
"smart-health-card"
],
"author": "",
"license": "MIT",
"author": "Health Intersections Pty Ltd",
"license": "BSD-3",
"overrides": {
"tar": "^7.5.7",
"fast-xml-parser": "^5.3.4"
},
"bin": {
"tx-import": "./tx-import.js"
}
"tx-import": "./tx-import.js",
"fhirsmith": "./server.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/HealthIntersections/fhirsmith.git"
},
"bugs": {
"url": "https://github.com/HealthIntersections/fhirsmith/issues"
},
"homepage": "https://github.com/HealthIntersections/fhirsmith#readme"
}
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
//
// Copyright 2025, Health Intersections Pty Ltd (http://www.healthintersections.com.au)
//
Expand Down
Empty file removed tx/incoming.txt
Empty file.