Skip to content

Commit

Permalink
Merge pull request #5 from mylanconnolly/master
Browse files Browse the repository at this point in the history
Change how working-directory works
  • Loading branch information
jstastny authored Sep 14, 2020
2 parents e9591e2 + 90a8442 commit 170e662
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release Ruby Gem to GitHub Packages
This action builds the gems for all `.gemspec` files in the projects root and uploads them to [GitHub Packages](https://github.com/features/packages).
This action builds the gems for all `.gemspec` files in the projects root and uploads them to [GitHub Packages](https://github.com/features/packages) (or optionally specify a subdirectory to build from).

## Usage
Example minimal workflow using this action:
Expand All @@ -26,10 +26,11 @@ See example project using this action at [https://github.com/jstastny/testgem](h
## Inputs
| Name | Description |
| -----| ------------|
| `token` | GitHub token that has write access to Packages. You can use `secrets.GITHUB_TOKEN` |
| `owner` | Name of the user or organization account that owns the repository containing your project |
| Name | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| `token` | GitHub token that has write access to Packages. You can use `secrets.GITHUB_TOKEN` |
| `owner` | Name of the user or organization account that owns the repository containing your project |
| `working-directory` | Optional parameter of the directory where you wish to build your gemspecs in (defaults to root) |

## Versioning your gem

Expand Down
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ touch ~/.gem/credentials
chmod 600 ~/.gem/credentials
echo ":github: Bearer ${GITHUB_TOKEN}" >> ~/.gem/credentials

cd "${WORKING_DIRECTORY:-.}"

echo "Building the gem"
gem build ${WORKING_DIRECTORY:-.}/*.gemspec
gem build *.gemspec
echo "Pushing the built gem to GitHub Package Registry"
gem push --key github --host "https://rubygems.pkg.github.com/${OWNER}" ./*.gem

0 comments on commit 170e662

Please sign in to comment.