Skip to content

Commit 44f2dc5

Browse files
authored
Merge pull request #1 from jrjohnson/and-away-we-go
Working Copy
2 parents c110e1c + 5525a20 commit 44f2dc5

36 files changed

Lines changed: 4276 additions & 129 deletions

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: weekly

.github/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
changelog:
2+
categories:
3+
- title: What's Changed
4+
labels:
5+
- "*"
6+
exclude:
7+
labels:
8+
- dependencies
9+
- title: Dependencies
10+
labels:
11+
- dependencies

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
quality:
14+
name: Code Quality
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- uses: actions/checkout@v6
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v6
21+
with:
22+
node-version: 24
23+
cache: pnpm
24+
- run: pnpm install
25+
- run: pnpm run lint
26+
- run: pnpm run typecheck
27+
28+
test:
29+
name: Test (Node ${{ matrix.node-version }})
30+
runs-on: ${{ matrix.os }}
31+
timeout-minutes: 5
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
node-version: [24]
36+
os: [ubuntu-latest, macos-latest, windows-latest]
37+
steps:
38+
- uses: actions/checkout@v6
39+
- uses: pnpm/action-setup@v4
40+
- uses: actions/setup-node@v6
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
cache: pnpm
44+
- run: pnpm install
45+
- run: pnpm run test
46+
47+
build:
48+
name: Build Check
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 5
51+
steps:
52+
- uses: actions/checkout@v6
53+
- uses: pnpm/action-setup@v4
54+
- uses: actions/setup-node@v6
55+
with:
56+
node-version: 24
57+
cache: pnpm
58+
- run: pnpm install
59+
- run: pnpm run build
60+
- run: |
61+
test -f dist/bin/visual-differ.js
62+
test -f dist/lib/visual-differ.js
63+
test -d dist/templates
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Notes
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
notes:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
with:
14+
fetch-depth: 0
15+
- uses: pnpm/action-setup@v4
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: 24
19+
cache: pnpm
20+
- uses: ncipollo/release-action@v1
21+
with:
22+
name: ${{github.ref_name}}
23+
token: ${{ secrets.PAT }}
24+
generateReleaseNotes: true

.github/workflows/release.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish NPM Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
11+
jobs:
12+
publish-npm:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: 24
20+
registry-url: https://registry.npmjs.org/
21+
cache: pnpm
22+
- run: pnpm install --ignore-scripts
23+
- run: pnpm build
24+
- name: publish
25+
run: pnpm publish --no-git-checks --provenance

.github/workflows/tag_version.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tag Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseType:
7+
description: 'Semver Release Type (major,minor,patch)'
8+
required: true
9+
default: 'patch'
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
tag:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v6
21+
with:
22+
token: ${{ secrets.PAT }}
23+
- uses: pnpm/action-setup@v4
24+
- uses: actions/setup-node@v6
25+
with:
26+
node-version: 24
27+
cache: pnpm
28+
- name: Validate releaseType
29+
run: pnpx in-string-list ${{ github.event.inputs.releaseType }} major,minor,patch
30+
- name: Setup Git
31+
run: |
32+
git config user.name Jon Johnson
33+
git config user.email jon.johnson@ucsf.edu
34+
- name: Increment Package Versions
35+
run: |
36+
pnpx versionup --level ${{ github.event.inputs.releaseType }}
37+
- name: Format Package JSON
38+
run: pnpm format
39+
- run: |
40+
NEW_TAG=`node -p "require('./package.json').version"`
41+
echo ${NEW_TAG}
42+
echo "new_tag=${NEW_TAG}" >> $GITHUB_ENV
43+
- name: Tag Version
44+
run: |
45+
git add package.json
46+
git commit -m "${{env.new_tag}}"
47+
git tag v${{env.new_tag}} -m "Tagging the v${{env.new_tag}} ${{ github.event.inputs.releaseType }} release"
48+
- name: Push Changes
49+
run: git push --follow-tags
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update pnpm Version
2+
on:
3+
schedule:
4+
- cron: '0 23 * * 2' # Weekly on Tuesday afternoons (UTC)
5+
workflow_dispatch:
6+
7+
jobs:
8+
update-pnpm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
- uses: pnpm/action-setup@v4
13+
- uses: actions/setup-node@v6
14+
with:
15+
node-version: 24
16+
cache: pnpm
17+
- name: Get latest pnpm version
18+
run: |
19+
PNPM_VERSION="$(npm view pnpm version)" # get the latest version of pnpm from the registry
20+
echo ${PNPM_VERSION}
21+
echo "pnpm_version=${PNPM_VERSION}" >> $GITHUB_ENV
22+
- name: Update package.json
23+
run: |
24+
jq '.packageManager = "pnpm@'"${{ env.pnpm_version }}"'"' package.json > temp.json
25+
mv temp.json package.json
26+
- name: Create Pull Request
27+
id: cpr
28+
uses: peter-evans/create-pull-request@v7
29+
with:
30+
token: ${{ secrets.PAT }}
31+
commit-message: Update PNPM to v${{ env.pnpm_version }}
32+
title: Update PNPM to v${{ env.pnpm_version }}
33+
body: |
34+
Update PNPM to v${{ env.pnpm_version }} the latest release.
35+
branch: update-pnpm-version
36+
labels: dependencies
37+
- name: Enable Pull Request Automerge
38+
if: steps.cpr.outputs.pull-request-operation == 'created'
39+
run: gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Transitive Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: '15 15 * * 5' # weekly, on Friday morning (UTC)
6+
workflow_dispatch: null
7+
8+
jobs:
9+
update:
10+
runs-on: macos-latest
11+
permissions:
12+
pull-requests: write
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: pnpm/action-setup@v4
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: 24
19+
cache: pnpm
20+
- name: remove and re-create lock file
21+
run: |
22+
rm pnpm-lock.yaml
23+
pnpm install --fix-lockfile
24+
pnpm dedupe
25+
- name: Create Pull Request
26+
id: cpr
27+
uses: peter-evans/create-pull-request@v7
28+
with:
29+
token: ${{ secrets.PAT }}
30+
commit-message: Update Transitive Dependencies
31+
title: Update Transitive Dependencies
32+
body: |
33+
- Dependency updates
34+
branch: auto-update-dependencies
35+
labels: dependencies
36+
- name: Enable Pull Request Automerge and Label for Tests
37+
if: steps.cpr.outputs.pull-request-operation == 'created'
38+
run: |
39+
gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
40+
env:
41+
GH_TOKEN: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)