To integrate Patchwing into your CI, use the setup-patchwing action. The
setup-patchwing action downloads Patchwing and adds it to the system path.
name: Patchwing Workflow Exampleon: workflow_dispatch:jobs: example: defaults: run: shell: bash runs-on: ubuntu-latest steps: # Use the setup-patchwing action to configure Patchwing - name: 🦋 Setup Patchwing uses: AstralWing/setup-patchwing@v1 with: cache: true # Optionally cache your Patchwing installation # Now we're able to use Patchwing CLI in our workflow - name: 🚀 Use Patchwing run: patchwing --version
In the above workflow, we’re using the setup-patchwing action to configure
Patchwing in our CI and in subsequent steps we can execute any Patchwing
commands.
Most Patchwing functionality, like creating releases and patches, requires
authentication. To authenticate in your CI, create an API key from the
Patchwing Console:
Go to Account → API Keys.
Click Create API Key.
Give the key a name (e.g., “GitHub Actions — my-app”), choose an expiration,
and select a permission level.
Copy the key value — it is only shown once.
Use this key as your PATCHWING_TOKEN in CI. The environment variable name is
unchanged from previous versions.
See API Keys for details on permission levels
and other key management options.
Next, copy the generated PATCHWING_TOKEN and navigate to your GitHub
repository secrets via:
"Settings" -> "Secrets and variables" -> "Actions".
Then, click "New repository secret" and paste your PATCHWING_TOKEN: