diff --git a/action.yml b/action.yml index d6e78e7..006945c 100644 --- a/action.yml +++ b/action.yml @@ -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" @@ -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/configure-rubygems-credentials@v1.0.0 + 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 }}