-
Notifications
You must be signed in to change notification settings - Fork 11
Switch to tag based releases #168
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
Merged
Changes from all commits
Commits
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 was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,45 +1,49 @@ | ||
| name: Release | ||
| name: Publish packages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: | ||
| - "v*.*.*" | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| group: npm-publish-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Version or publish packages | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Check out repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24.x | ||
| cache: "yarn" | ||
| cache-dependency-path: "yarn.lock" | ||
| node-version: 24 | ||
| package-manager-cache: false | ||
| registry-url: "https://registry.npmjs.org" | ||
|
|
||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Set up Yarn | ||
| run: | | ||
| corepack enable | ||
| corepack prepare yarn@4.9.3 --activate | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --immutable | ||
|
|
||
| - name: Create release PR or publish | ||
| uses: changesets/action@v1 | ||
| with: | ||
| version: yarn version-packages | ||
| publish: yarn release | ||
| - name: Verify release tag and package artifacts | ||
| env: | ||
| RELEASE_TAG: ${{ github.ref_name }} | ||
| run: yarn release:check --version "${RELEASE_TAG#v}" | ||
|
|
||
| - name: Run CI checks | ||
| run: yarn ci | ||
|
|
||
| - name: Publish packages | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| RELEASE_TAG: ${{ github.ref_name }} | ||
| run: yarn release --version "${RELEASE_TAG#v}" | ||
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,17 @@ | ||
| # Agent Instructions | ||
|
|
||
| ## Release And Publish Flow | ||
|
|
||
| When publishing the `@simple-photo-gallery/common`, `@simple-photo-gallery/theme-modern`, and `simple-photo-gallery` packages, use the GitHub Actions CI flow. Do not run `npm publish` manually from a local shell, and do not ask for an npm OTP for these packages. | ||
|
|
||
| The publish workflow lives in `.github/workflows/release.yml` and is triggered by tags matching `v*.*.*`. All three packages are released together. The workflow verifies that every package version matches the tag, runs the repository CI checks and a package dry-run, then publishes the packages to npm in dependency order. | ||
|
|
||
| Use this sequence for releases: | ||
|
|
||
| 1. Check the registry versions with `npm view @simple-photo-gallery/common version`, `npm view @simple-photo-gallery/theme-modern version`, and `npm view simple-photo-gallery version`. | ||
| 2. Bump `common/package.json`, `themes/modern/package.json`, and `gallery/package.json` to the same next patch, minor, or major version. | ||
| 3. Run `yarn ci` and `yarn release:check --version <version>` from the repository root. | ||
| 4. Commit the release changes. | ||
| 5. Push the release commit to `main`. | ||
| 6. Create and push the matching version tag, for example `git tag v2.2.2 && git push origin v2.2.2`. | ||
| 7. Verify all three packages on npm before updating downstream applications. |
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
Oops, something went wrong.
Oops, something went wrong.
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.