Skip to content
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

ci: prepare release script to run on v1.x branch #5276

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/create-or-update-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
uses: actions/checkout@v4
with:
repository: opentelemetrybot/opentelemetry-js
ref: main
ref: v1.x
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- name: Sync with upstream
run: |
git remote show origin
git remote add upstream https://github.com/open-telemetry/opentelemetry-js.git
git fetch upstream
git reset --hard upstream/main
git push origin main --force
git reset --hard upstream/v1.x
git push origin v1.x --force

- uses: actions/setup-node@v4
with:
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@
"_changelog:prepare_semconv": "node scripts/update-changelog.js ./semantic-conventions/CHANGELOG.md ./semantic-conventions/package.json",
"_changelog:prepare_all": "npm run _changelog:prepare_api && npm run _changelog:prepare_experimental && npm run _changelog:prepare_stable",
"_github:draft_release:all": "npm run _github:draft_release:api && _github:draft_release:experimental && _github:draft_release:stable",
"_github:draft_release:api": "node scripts/extract-latest-release-notes.js ./api/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./api/package.json | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target main --title api/v$VERSION api/v$VERSION",
"_github:draft_release:experimental": "node scripts/extract-latest-release-notes.js ./experimental/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./experimental/packages/ | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target main --title experimental/v$VERSION experimental/v$VERSION",
"_github:draft_release:stable": "node scripts/extract-latest-release-notes.js ./CHANGELOG.md && VERSION=$(node scripts/get-version.js ./packages/ | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target main --title v$VERSION v$VERSION",
"_github:draft_release:semconv": "node scripts/extract-latest-release-notes.js ./semantic-conventions/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./semantic-conventions/package.json | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target main --title semconv/v$VERSION semconv/v$VERSION",
"_github:update_release_pr_body_from_file": "gh pr edit --repo open-telemetry/opentelemetry-js $RELEASE_PR_OWNER:release/next-version --body-file ./.tmp/release-notes.md",
"_github:draft_release:api": "node scripts/extract-latest-release-notes.js ./api/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./api/package.json | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target v1.x --title api/v$VERSION api/v$VERSION",
"_github:draft_release:experimental": "node scripts/extract-latest-release-notes.js ./experimental/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./experimental/packages/ | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target v1.x --title experimental/v$VERSION experimental/v$VERSION",
"_github:draft_release:stable": "node scripts/extract-latest-release-notes.js ./CHANGELOG.md && VERSION=$(node scripts/get-version.js ./packages/ | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target v1.x --title v$VERSION v$VERSION",
"_github:draft_release:semconv": "node scripts/extract-latest-release-notes.js ./semantic-conventions/CHANGELOG.md && VERSION=$(node scripts/get-version.js ./semantic-conventions/package.json | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+$') && gh release create --draft --notes-file ./.tmp/release-notes.md --target v1.x --title semconv/v$VERSION semconv/v$VERSION",
"_github:update_release_pr_body_from_file": "gh pr edit --repo open-telemetry/opentelemetry-js $RELEASE_PR_OWNER:release/next-v1-version --body-file ./.tmp/release-notes.md",
"_github:update_release_pr_body:all": "node scripts/extract-latest-release-notes.js api/CHANGELOG.md ./CHANGELOG.md experimental/CHANGELOG.md && npm run _github:update_release_pr_body_from_file",
"_github:update_release_pr_body:sdk": "node scripts/extract-latest-release-notes.js ./CHANGELOG.md experimental/CHANGELOG.md && npm run _github:update_release_pr_body_from_file",
"_github:update_release_pr_body:experimental": "node scripts/extract-latest-release-notes.js experimental/CHANGELOG.md && npm run _github:update_release_pr_body_from_file",
"_github:update_release_pr_body:semconv": "node scripts/extract-latest-release-notes.js semantic-conventions/CHANGELOG.md && npm run _github:update_release_pr_body_from_file",
"_verify_release_kind": "echo $RELEASE_KIND | grep -oE '^(all|sdk|experimental|semconv):(minor|patch)$'",
"_verify_release_remote": "git remote get-url $RELEASE_PR_REMOTE",
"_github:update_release_branch": "npm run _verify_release_kind && npm run _verify_release_remote && (git checkout main && git pull upstream main && git branch -D release/next-version; git checkout -b release/next-version && npm run prepare_release:$RELEASE_KIND && git commit -am \"chore: prepare release\" && git push --set-upstream $RELEASE_PR_REMOTE --force release/next-version)",
"github:create_or_update_release_pr": "npm run _github:update_release_branch && (gh pr create --repo open-telemetry/opentelemetry-js --title 'chore: prepare next release' --body ''; npm run _github:update_release_pr_body:$RELEASE_SCOPE)"
"_github:update_release_branch": "npm run _verify_release_kind && npm run _verify_release_remote && (git checkout v1.x && git pull upstream v1.x && git branch -D release/next-v1-version; git checkout -b release/next-v1-version && npm run prepare_release:$RELEASE_KIND && git commit -am \"chore: prepare release\" && git push --set-upstream $RELEASE_PR_REMOTE --force release/next-v1-version)",
"github:create_or_update_release_pr": "npm run _github:update_release_branch && (gh pr create --repo open-telemetry/opentelemetry-js --title 'chore: prepare next v1.x release' --body ''; npm run _github:update_release_pr_body:$RELEASE_SCOPE)"
},
"repository": "open-telemetry/opentelemetry-js",
"keywords": [
Expand Down
Loading