-
Notifications
You must be signed in to change notification settings - Fork 2
GitHub Action to publish release #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: 'npm' | ||
| directory: '/' | ||
| schedule: | ||
| interval: 'weekly' | ||
| open-pull-requests-limit: 100 | ||
| - package-ecosystem: 'github-actions' | ||
| directory: '/' | ||
| schedule: | ||
| interval: 'weekly' | ||
| open-pull-requests-limit: 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Build and Publish | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: "24" | ||
|
|
||
| - run: npm ci | ||
|
|
||
| - name: Set version | ||
| run: | | ||
| CURRENT_VERSION=$(npm pkg get version | tr -d '"') | ||
| RELEASE_VERSION="${CURRENT_VERSION%.*}.$(date +%Y%m%d)" | ||
bkeepers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | ||
| npm version "$RELEASE_VERSION" --no-git-tag-version | ||
|
|
||
| - name: Publish to npm | ||
| run: npm publish | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: ncipollo/release-action@v1 | ||
| with: | ||
| tag: v${{ env.RELEASE_VERSION }} | ||
| generateReleaseNotes: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| ## NOAA Tide Station Data Overview | ||
|
|
||
| This script fetches tide station metadata from NOAA CO-OPS and converts it into a local, normalized dataset. It classifies stations by prediction method, stores harmonic constituents or prediction offsets as appropriate, and records available tidal datums for reference. | ||
|
|
||
| The goal is to mirror how NOAA operationally produces tide predictions, not just what data exists in their metadata. | ||
|
|
||
| ### Reference stations | ||
|
|
||
| Reference stations use **harmonic constituents** to generate tide predictions. These stations: | ||
|
|
||
| - Have a full harmonic solution derived from long water-level records | ||
| - Support predictions in multiple datums (MLLW, MSL, MTL, etc., when available) | ||
| - Can produce both continuous predictions and high/low events | ||
|
|
||
| For these stations, the script downloads harmonic constituents and datum values directly from NOAA. | ||
|
|
||
| ### Subordinate stations | ||
|
|
||
| Subordinate stations do not use harmonics for predictions. Instead, their tides are derived from a nearby reference station using **prediction offsets**. | ||
|
|
||
| For subordinate stations: | ||
|
|
||
| - High and low tide times are shifted by a fixed number of minutes | ||
| - Tide heights are adjusted using either additive or ratio-based offsets | ||
| - Predictions are based on extreme events only, with linear interpolation between them | ||
| - NOAA serves predictions **only in MLLW** and **only as high/low events** | ||
|
|
||
| Some subordinate stations still list harmonic constituents in NOAA metadata; these are retained for historical and analytical purposes but are not used operationally. | ||
|
|
||
| ### Datums | ||
|
|
||
| NOAA’s predictions are produced by offsetting tidal predictions from MSL (mean sea level), so that the requested datum corresponds to zero. | ||
|
|
||
| - Reference stations can return predictions in any supported datums | ||
| - Subordinate stations return predictions in **MLLW only**, even if other datums are listed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.