Skip to content

Commit

Permalink
Cleanup readme text
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitlens authored Jun 13, 2024
1 parent 18060b9 commit 043316f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ When triggered, this workflow:
### Prerequisites

- Create a GitHub Actions workflow file `.github/workflows/release.yml` in your repository.
- Decide how the compliation workflow will be triggered. The recommended way is to configure workflow activation on git tag creation. This should simplify versioning and ensure unique release names.
- Decide how the compilation workflow will be triggered. The recommended way is to configure workflow activation on git tag creation. This should simplify versioning and ensure unique release names.

### Workflow inputs and secrets

Basic compilation workflow path:
`stellar-expert/soroban-build-workflow/.github/workflows/release.yml@main`

The workflow expects the following inputs in the `with` section:
- `release_name` (required) - release name template that includes a release version variable, e.g. `${{ github.ref_name }}`
- `package` (optional) - package name to build. Builds contract in working directory by default
- `relative_path` (optional) - relative path to the contract source directory. Defaults to the repository root directory
- `make_target` (optional) - make target to invoke. Not invoked by default. Useful for contracts with dependencies, that must be built before the main contract
- `release_name` (required) - release name template (should include a release version variable, e.g. `${{ github.ref_name }}`)
- `package` (optional) - package name to build, builds contract in working directory by default
- `relative_path` (optional) - relative path to the contract source directory, defaults to the repository root directory
- `make_target` (optional) - make target to invoke, empty by default (useful for contracts with dependencies that must be built before the main contract)

### Basic workflow for the reporisotry with a single contract

Expand All @@ -33,7 +33,7 @@ name: Build and Release # name it whatever you like
on:
push:
tags:
- 'v*' # triggered whenever a new tag (previxed with "v") is pushed to the repository
- 'v*' # triggered whenever a new tag (prefixed with "v") is pushed to the repository
jobs:
release-contract-a:
uses: stellar-expert/soroban-build-workflow/.github/workflows/release.yml@main
Expand All @@ -47,6 +47,16 @@ jobs:
release_token: ${{ secrets.GITHUB_TOKEN }} # don't modify this line
```
### Workflow permissions
In order to create a release, the workflow needs `contents: write` permission. Default workflow permissions for a repository can be found at
"Settings"->"Actions"->"Workflow permissions". This workflow should work just fine with default settings ("Read and write permissions").
Alternatively, it's possible to specify permissions in the `.github/workflows/release.yml` configuration file itself:
```yaml
permissions:
contents: write
```

### Building multiple contracts

To build multiple contracts, add a separate job for each contract. The workflow will compile and release each contract independently.
Expand Down

0 comments on commit 043316f

Please sign in to comment.