README.md in puppet_forge-4.0.0 vs README.md in puppet_forge-4.1.0
- old
+ new
@@ -134,10 +134,26 @@
# Unpack the files to a given directory
# @raise RuntimeError if it fails to extract the contents of the release tarball
PuppetForge::Unpacker.unpack(release_tarball, dest_dir, tmp_dir)
```
+### Uploading a module release
+You can upload new module versions to the forge by following the steps below.
+
+> Note: This API requires authorization. See [Authorization](#authorization) for more information.
+
+```ruby
+release_tarball = 'pkg/puppetlabs-apache-1.6.0.tar.gz'
+
+# Upload a module tarball to the Puppet Forge
+# Returns an instance of V3::Release class and the response from the forge upload
+# @raise PuppetForge::ReleaseForbidden if a 403 response is recieved from the server
+# @raise PuppetForge::ReleaseBadContent if the module to upload is not valid
+# @raise Faraday::ClientError if any errors encountered in the upload
+# @raise PuppetForge::FileNotFound if the given tarball cannot be found
+release, response = PuppetForge::V3::Release.upload(release_tarball)
+```
### Paginated Collections
The Forge API only returns paginated collections as of v3.