Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1c0b626
chore: Move the GitHub app token generation step after checkout
oluwatobiss Feb 3, 2026
50b1992
chore: Make breaking-change makers detectable
oluwatobiss Feb 3, 2026
c420a71
chore: Remove packages permission
oluwatobiss Feb 3, 2026
caeaab4
ci: Bump dependencies
oluwatobiss Apr 30, 2026
a3cb7e5
ci: Use GitHub token for semantic-release authentication
oluwatobiss Apr 30, 2026
cc32a99
build: Create scripts to copy stylesheet and add package.json files t…
oluwatobiss Apr 30, 2026
b729b6f
ci: Don't use semantic-release to edit source files in the project's …
oluwatobiss Apr 30, 2026
ca0ca8e
chore: Delete changelog
oluwatobiss Apr 30, 2026
4d65166
refactor: Use esm exporting syntax
oluwatobiss Apr 30, 2026
2c147dd
refactor: Configure Jest to strip extensions from import statements
oluwatobiss Apr 30, 2026
114dd28
chore: Notify developers that the package uses automated version mana…
oluwatobiss Apr 30, 2026
fd037d4
chore: Update module resolution from node10 to nodenext
oluwatobiss Apr 30, 2026
a5a06dd
style!: Make stylesheet available as a public asset
oluwatobiss Apr 30, 2026
82fb8f3
refactor!: Remove customStyles prop
oluwatobiss Apr 30, 2026
dbed480
style: Prefix classes with cs-rigg-
oluwatobiss Apr 30, 2026
67f7dd7
test: Remove customStyles test logic
oluwatobiss Apr 30, 2026
dc5f457
docs: Document the predefined stylesheet's usage
oluwatobiss Apr 30, 2026
bd663f5
refactor: Change .jsx extension to .tsx
oluwatobiss Apr 30, 2026
4823039
chore: Remove customStyles prop
oluwatobiss Apr 30, 2026
b8d017e
style: Remove ImageGalleryStylesType interface
oluwatobiss May 1, 2026
892fb00
feat: Make image's onclick action customizable
oluwatobiss May 1, 2026
454494d
refactor: Use a single function to update caption opacity on mouse en…
oluwatobiss May 1, 2026
66f965a
fix: Prevent caption overflowing out of its container
oluwatobiss May 1, 2026
561f6df
refactor: Modularize helper logic
oluwatobiss May 1, 2026
a615939
feat: Let the customizeImageClickAction function provide access to th…
oluwatobiss May 1, 2026
ad644aa
refactor!: Rename imagesInfoArray to imagesData
oluwatobiss May 1, 2026
ec97850
refactor: Rename ImageInfoType to ImageDataType
oluwatobiss May 1, 2026
03e834d
refactor: Rename imageInfo to imageData
oluwatobiss May 1, 2026
7d398b0
feat: Allow adding a cta link to each image's caption in the lightbox
oluwatobiss May 3, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
- uses: wagoid/commitlint-github-action@v6
43 changes: 10 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,36 @@ on:
- main

permissions:
contents: write # create tags, releases, and commit changelogs
id-token: write # exchange OIDC token with the npm registry for authentication (publish to npm)
packages: write # publish to npm registry via GitHub Packages (trusted publishing)
id-token: write
contents: write

jobs:
release:
name: semantic-release
name: Semantic Release
runs-on: ubuntu-latest

steps:
# Generate a GitHub App token for authentication instead of using a personal access token
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}

# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags (required to allow semantic-release to analyze commits)
persist-credentials: false # Explicitly disable the token persistence
fetch-depth: 0
persist-credentials: false

# Reconfigure git remote URL to use the GitHub App token for authentication instead of the default GITHUB_TOKEN for pushing changes back to the repository by semantic-release
- name: Authenticate git with GitHub App token
run: |
git remote set-url origin \
https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git

# Setup Node.js v24
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org

# Install semantic-release plugins to determine the next version, update changelog, publish to npm, and create GitHub release
# - semantic-release: The main semantic-release package
# - @semantic-release/changelog: Update the changelog file
# - @semantic-release/git: Commit changelog and version bump
# - conventional-changelog-conventionalcommits: Conventional Commits preset for changelog generation
- name: Install semantic-release (CI-only)
- name: Install semantic-release
run: |
npm install --no-save \
semantic-release@25 \
@semantic-release/changelog@6 \
@semantic-release/git@10 \
conventional-changelog-conventionalcommits@9 \

# Run semantic-release to automate the release process
- name: Build package
run: npm run build

- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} # Use GitHub App token for semantic-release authentication
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
47 changes: 11 additions & 36 deletions .releaserc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ export default {
branches: ["main"],
repositoryUrl: "https://github.com/codesweetly/react-image-grid-gallery",
plugins: [
// 1. Analyze commits and map them to release types
[
"@semantic-release/commit-analyzer", // infer bump from commits
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
parserOpts: {
noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES"],
},
releaseRules: [
{ breaking: true, release: "major" },
{ type: "feat", release: "minor" },
{ type: "fix", release: "patch" },
{ type: "perf", release: "patch" },
{ type: "refactor", release: "patch" },
// Docs & DX improvements still get patch releases
{ type: "docs", release: "patch" },
{ type: "style", release: "patch" },
// Ignore noise
{ type: "build", release: false },
{ type: "test", release: false },
{ type: "chore", release: false },
{ type: "ci", release: false },
],
},
],
// 2. Generate clean, readable release notes
[
"@semantic-release/release-notes-generator",
{
Expand All @@ -40,47 +41,21 @@ export default {
{ type: "style", section: "🎨 Code Style" },
],
},
parserOpts: {
mergePattern: "^Merge pull request",
mergeCorrespondence: null,
},
writerOpts: {
groupBy: "type",
commitGroupsSort: "title",
commitsSort: ["scope", "subject"],
},
},
],
// 3. Write formatted changelog to CHANGELOG.md
[
"@semantic-release/changelog",
{
changelogFile: "CHANGELOG.md",
changelogTitle:
"# 📦 Changelog\n\nAll notable changes to **react-image-grid-gallery** are documented here.\n",
writerOpts: {
groupBy: "type",
commitGroupsSort: "title",
},
},
],
// 4. Update version + publish to npm
[
"@semantic-release/npm",
{
npmPublish: true,
},
],
// 5. Commit changelog + version bump back to repo
["@semantic-release/npm", { npmPublish: true }],
[
"@semantic-release/git",
"@semantic-release/github",
{
assets: ["package.json", "package-lock.json", "CHANGELOG.md"],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
successComment: false,
failComment: false,
releasedLabels: false,
},
],
// 6. Create GitHub release notes & tag
"@semantic-release/github",
],
};
Loading