Skip to content
Define your release steps πŸš€
Branch: master
Clone or download
Latest commit 66e003d Jun 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation/Steps Update Jan 21, 2019
Sources fix optional package config decode Apr 19, 2019
Tests Fix rocket steps decoding Apr 19, 2019
.gitignore Initial commit Nov 29, 2018
.swift-version Added swift-version file Dec 3, 2018
.test.yml run rocket during the CI on a test yaml file Dec 10, 2018
.travis.yml Remove before after step tests Feb 9, 2019
Package.resolved Update Yams Jun 13, 2019
Package.swift Unhide dependencies Jun 13, 2019 Update Apr 19, 2019

Rocket πŸš€

Swift CLI release tool for Git repos and Swift Packages


You can install Rocket with SPM

  1. Add or amend a Package.swift
  2. Add this dependency .package(url: "", from: "0.1.0")
  3. Then you can run swift run rocket 1.0.0 where 1.0.0 is the version that you want to release

Setup the release steps


Create a file called .rocket.yml with your steps inside

  - script: 
      content: ruby Scripts/update_changelog.rb
  - git_add:
  - commit:
      message: "Releasing version $VERSION"
  - tag
  - push

With PackageConfig

With PackageConfig ( you can put the configuration at the end of your Package.swift

#if canImport(PackageConfig)
    import PackageConfig
    let config = PackageConfiguration([
        "rocket": ["steps":
                ["script": ["content": "ruby Scripts/update_changelog.rb"]]
                ["git_add": ["paths": [""]]],
                ["commit": ["message": "Releasing version $VERSION"]],

Default steps

If there is no step definition Rocket will run the default steps:

  • hide_dev_dependencies
  • git_add
  • commit
  • tag
  • unhide_dev_dependencies
  • git_add
  • commit (message: "Unhide dev dependencies")
  • push (remote=origin branch=master)

Before/After steps

If you use the before and/or after keys


  - script: 
      content: echo "Testing Release for $VERSION"
  - script: 
      content: echo "released $VERSION"

Rocket will execute the default steps between the before and after steps

  • echo "Testing Release for $VERSION"

  • hide_dev_dependencies

  • git_add

  • commit

  • tag

  • unhide_dev_dependencies

  • git_add

  • commit (message: "Unhide dev dependencies")

  • push (remote=origin branch=master)

  • echo "released $VERSION"

Hide dev dependencies

When you release a package you want that who adds it as dependency downloads just the dependencies that are really needed to your package.

This is why Rocket introduces the concept of dev dependency, if you have in your package some scripts e.g. swiftformat you can add them as dev dependencies (by adding // dev after them) and they will be commented by the hide_dev_dependencies step and uncommented from the unhide_dev_dependencies.

That is also valid for the dependencies that are used just from test targets, but in that case you will have to add the test target as dev dependency too.

Some examples are:


You can find the full steps list here

Variable $VERSION

You can use the variable $VERSION inside the steps to refer to the version you are releasing

Next steps

  • Add a step to execute script files written in swift
  • Add a step to comment the dev dependencies on the Package.swift
  • Add a step to create Github releases
You can’t perform that action at this time.