Skip to content

Commit

Permalink
Updating test based on error. Removing commented code for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
skduncan committed Oct 22, 2024
1 parent 3d21925 commit dcd01f7
Showing 1 changed file with 3 additions and 74 deletions.
77 changes: 3 additions & 74 deletions .github/workflows/github-actions-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ jobs:
new_npm_version=$(yarn version --prerelease --preid rc --no-git-tag-version | grep "New version:" | awk '{print $4}')
else
case ${{ env.SEMVER_LABEL }} in
major)
Major)
new_npm_version=$(yarn version --premajor --preid rc --no-git-tag-version | grep "New version:" | awk '{print $4}')
;;
minor)
Minor)
new_npm_version=$(yarn version --preminor --preid rc --no-git-tag-version | grep "New version:" | awk '{print $4}')
;;
patch)
Patch)
new_npm_version=$(yarn version --prepatch --preid rc --no-git-tag-version | grep "New version:" | awk '{print $4}')
;;
*)
Expand Down Expand Up @@ -211,74 +211,3 @@ jobs:
echo "new_npm_version=${current_version}" >> $GITHUB_ENV
new_ruby_version=$(echo $current_version | sed 's/-rc\./.pre.rc./')
echo "new_ruby_version=${new_ruby_version}" >> $GITHUB_ENV
# - name: Update Version.rb
# run: |
# gem install bundler
# bundle
# bin/rails pb_release:action[${{env.new_ruby_version}}]
# - name: Distribute and Publish (NPM)
# run: |
# yarn install
# bundle
# yarn release
# npm pack
# npm publish --registry https://registry.npmjs.org playbook-ui-${{ env.new_npm_version }}.tgz --tag rc
# - name: Distribute and Publish (RubyGems)
# run: |
# bin/build_gem
# gem build lib/playbook_ui_docs.gemspec
# rm -rf dist/playbook-doc.js dist/playbook-rails.js dist/app dist/pb_doc_helper.rb dist/menu.yml
# gem push playbook_ui-${{ env.new_ruby_version }}.gem --host https://rubygems.org/ --key ${{ env.GEM_HOST_API_KEY }}
# gem push playbook_ui_docs-${{ env.new_ruby_version }}.gem --host https://rubygems.org/ --key ${{ env.GEM_HOST_API_KEY }}
# - name: Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release create v${{ env.new_npm_version }} \
# --title "Release Candidate v${{ env.new_npm_version }}" \
# --notes "This is a release candidate version. Please test thoroughly before promoting to a stable release." \
# --prerelease
# - name: Leave PR comment
# uses: actions/github-script@v6
# env:
# PR_NUMBER: ${{ github.event.pull_request.number }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# RUBY_GEM_VERSION: ${{ env.new_ruby_version }}
# RUBY_GEM_LINK: https://rubygems.org/gems/playbook_ui/versions/${{env.new_ruby_version}}
# NPM_VERSION: ${{ env.new_npm_version }}
# NPM_LINK: https://www.npmjs.com/package/playbook-ui/v/${{env.new_npm_version}}
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const commitSha = context.payload.head_commit.id;
# const commitMessage = context.payload.head_commit.message;
# const commitAuthor = context.payload.head_commit.author.name;
# const commitUrl = context.payload.head_commit.url;

# console.log(`Commit message: ${commitMessage}`);
# console.log(`Commit author: ${commitAuthor}`);
# console.log(`Commit URL: ${commitUrl}`);

# // Get the PR related to this commit using octokit API
# const pullRequests = await github.rest.repos.listPullRequestsAssociatedWithCommit({
# owner: context.repo.owner,
# repo: context.repo.repo,
# commit_sha: commitSha
# });

# if (pullRequests.data.length > 0) {
# const pullRequestNumber = pullRequests.data[0].number;
# console.log(`Found pull request #${pullRequestNumber} for commit ${commitSha}`);

# // Add a comment to the pull request
# await github.rest.issues.createComment({
# issue_number: pullRequestNumber,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `You merged this pr to master branch:
# - Ruby Gem: [${{env.RUBY_GEM_VERSION}}](${{env.RUBY_GEM_LINK}})
# - NPM: [${{env.NPM_VERSION}}](${{env.NPM_LINK}})`
# });
# } else {
# console.log('No pull request found for this commit');
# }

0 comments on commit dcd01f7

Please sign in to comment.