-
Notifications
You must be signed in to change notification settings - Fork 142
[CLNP-8355] [ci]: add automated release workflow and update CI to Node 24 #1414
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
Show all changes
42 commits
Select commit
Hold shift + click to select a range
06a3a62
Implement
sf-tyler-jeong dc367f4
chore: migrate npm publish to OIDC trusted publishing
sf-tyler-jeong bc43850
fix warnings
sf-tyler-jeong eeae3ce
ci: add test step to release workflow before npm publish
sf-tyler-jeong 79eb576
ci: add workflow for manual Node 24 build and test verification
sf-tyler-jeong 0fd80e7
ci: update build-and-test workflow to Node 24 with latest actions
sf-tyler-jeong 123b89a
fix: replace deprecated import assert with import with in rollup config
sf-tyler-jeong cd7aa3f
ci: handle unhandled rejection in test step for Node 24 compatibility
sf-tyler-jeong 7edf6bb
test: mock global fetch in jest setup for Node 24 native fetch compat…
sf-tyler-jeong dd163ea
ci: change coverage workflow to manual trigger and update actions
sf-tyler-jeong 23c388e
ci: add lint step and align test options with build-and-test workflow
sf-tyler-jeong f6bfeb4
fix: prevent shell injection in package-publish npm_tag input
sf-tyler-jeong 13b9bf8
fix: resolve shell injection and env context warnings in package-publish
sf-tyler-jeong 641124c
chore: fix missing comma and use single quotes in jest config
sf-tyler-jeong c860537
ci: switch coverage to manual trigger with original config as comments
sf-tyler-jeong 21ee9f4
ci: add JUnit reporter, failed test retry script, and reorder release…
sf-tyler-jeong 7ee3365
fix: use env vars instead of expression interpolation in release work…
sf-tyler-jeong bfdf72b
fix: correct python package check and add contents write permission i…
sf-tyler-jeong dbf4b11
fix: rebuild dist after merge and enable file attribute in jest-junit
sf-tyler-jeong 1c5a2b7
ci: automate CHANGELOG.md updates and finalize release date
sf-tyler-jeong 0641a48
ci: remove skip-template check from prepare-changelog
sf-tyler-jeong 90de97a
ci: harden release workflows after code review
sf-tyler-jeong 8734311
ci: add CHANGELOG_DRAFT.md freshness check to release workflow
sf-tyler-jeong 25cd4d9
ci: detect template-only CHANGELOG_DRAFT.md as a release blocker
sf-tyler-jeong b752694
ci: validate release branch and wait for checks before merge
sf-tyler-jeong e3ad381
ci: sleep before gh pr checks --watch to avoid race
sf-tyler-jeong 4859cfb
ci: migrate package-publish to OIDC trusted publishing
sf-tyler-jeong f42aa34
ci: unify permissions.contents to write across publish workflows
sf-tyler-jeong a1299d3
ci: fix Node version and repository URL for npm OIDC publish
sf-tyler-jeong 5c54bd4
docs(ci): note npm Trusted Publisher swap for manual publish workflow
sf-tyler-jeong 7658017
docs: remove obsolete RELEASE_GUIDE.md from public repo
sf-tyler-jeong 63f0480
ci: enforce dispatch ref matches version input in package-publish
sf-tyler-jeong 9525cdd
ci: use yarn install --immutable in package-publish
sf-tyler-jeong 8c3d75f
ci: prevent prerelease publish to latest and orphan tag_suffix
sf-tyler-jeong 6b93459
ci: tighten input validation to forbid prerelease in version and npm_…
sf-tyler-jeong a4b9d66
ci: align npm_tag/tag_suffix regex with semver prerelease identifier set
sf-tyler-jeong 852cb3e
ci: enforce dot-separated semver prerelease form for npm_tag/tag_suffix
sf-tyler-jeong 52f39e2
ci: tighten semver validation, empty-draft, and junit parser
sf-tyler-jeong 4c50a76
ci: reject npm_tag starting with digit or v/V
sf-tyler-jeong 01abdad
build: read package.json via createRequire for Node 18.0+ compat
sf-tyler-jeong 90ca78b
docs: add v3.17.12 changelog entry for MessageInput zero-width space fix
sf-tyler-jeong ecce64d
Merge branch 'main' into feature/CLNP-8355
sf-tyler-jeong 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
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,11 +1,18 @@ | ||
| name: Coverage Report | ||
|
|
||
| # Manual trigger only. To restore PR comment trigger, replace workflow_dispatch with: | ||
| # on: | ||
| # issue_comment: | ||
| # types: [created, edited] | ||
| # And add this condition to the job: | ||
| # if: github.event.issue.pull_request && contains(github.event.comment.body, './coverage') | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created, edited] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| coverage: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.issue.pull_request && contains(github.event.comment.body, './coverage') | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: ArtiomTr/jest-coverage-report-action@v2 | ||
| coverage: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: ArtiomTr/jest-coverage-report-action@v2 |
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
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,71 @@ | ||
| name: Prepare CHANGELOG | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'release/v*' | ||
| paths: | ||
| - 'CHANGELOG_DRAFT.md' | ||
| - 'package.json' | ||
|
|
||
| concurrency: | ||
| group: prepare-changelog-${{ github.ref_name }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| prepare: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| BRANCH_NAME: ${{ github.ref_name }} | ||
| BOT_EMAIL: 'sha.sdk_deployment@sendbird.com' | ||
| BOT_NAME: 'sendbird-sdk-deployment' | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| token: ${{ secrets.SDK_GH_BOT1_TOKEN }} | ||
| fetch-depth: 2 | ||
| ref: ${{ github.ref_name }} | ||
|
|
||
| - name: Skip if last commit was made by the release bot | ||
| id: skip-bot | ||
| run: | | ||
| last_author=$(git log -1 --pretty=%ae) | ||
| if [ "$last_author" = "$BOT_EMAIL" ]; then | ||
| echo "Last commit author is the release bot ($BOT_EMAIL); skipping." | ||
| echo "skip=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Setup Node.js | ||
| if: steps.skip-bot.outputs.skip != 'true' | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '24' | ||
|
|
||
| - name: Update CHANGELOG.md | ||
| if: steps.skip-bot.outputs.skip != 'true' | ||
| run: | | ||
| VERSION="${BRANCH_NAME#release/v}" | ||
| DATE=$(date -u '+%b %d %Y' | tr '[:lower:]' '[:upper:]') | ||
| export VERSION DATE | ||
| node scripts/update-changelog.js | ||
|
|
||
| - name: Commit and push CHANGELOG.md | ||
| if: steps.skip-bot.outputs.skip != 'true' | ||
| run: | | ||
| if git diff --quiet CHANGELOG.md; then | ||
| echo "CHANGELOG.md unchanged; nothing to commit." | ||
| exit 0 | ||
| fi | ||
| VERSION="${BRANCH_NAME#release/v}" | ||
| git config user.email "$BOT_EMAIL" | ||
| git config user.name "$BOT_NAME" | ||
| git add CHANGELOG.md | ||
| git commit -m "chore: prepare CHANGELOG.md for v${VERSION}" | ||
| git push origin "$BRANCH_NAME" |
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.