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

Allow specifying the working directory to run the release task in #12

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from
Open
Changes from all 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
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
Only works with RubyGems.org via Trusted Publishing.
required: false
default: "true"
working-directory:
description: "The working directory to run the release rake task in"
required: false
default: ""
outputs: {}
branding:
color: "red"
Expand All @@ -30,15 +34,19 @@ runs:
git config --global user.name "$(git log -1 --pretty=format:'%an')"
git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY"
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Configure trusted publishing credentials
if: ${{ inputs.setup-trusted-publisher == 'true' }}
uses: rubygems/[email protected]
working-directory: ${{ inputs.working-directory }}
- name: Run release rake task
run: bundle exec rake release
shell: bash
env:
RUBYOPT: "${{ inputs.attestations == 'true' && format('-r{0}/rubygems-attestation-patch.rb {1}', github.action_path, env.RUBYOPT) || env.RUBYOPT }}"
working-directory: ${{ inputs.working-directory }}
- name: Wait for release to propagate
if: ${{ inputs.await-release == 'true' }}
run: gem exec rubygems-await pkg/*.gem
shell: bash
working-directory: ${{ inputs.working-directory }}