Skip to content

Commit 5ad1cf0

Browse files
authored
Merge pull request #17 from fern-api/devin/1772494437-readme-branding
2 parents 2d045a2 + bfad822 commit 5ad1cf0

1 file changed

Lines changed: 32 additions & 12 deletions

File tree

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
# sync-openapi
1+
<br/>
2+
<div align="center">
3+
<a href="https://www.buildwithfern.com/?utm_source=github&utm_medium=readme&utm_campaign=sync-openapi&utm_content=logo">
4+
<picture>
5+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fern-api/fern/main/fern/images/logo-white.svg">
6+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/fern-api/fern/main/fern/images/logo-primary.svg">
7+
<img alt="logo" src="https://raw.githubusercontent.com/fern-api/fern/main/fern/images/logo-primary.svg" height="80" align="center">
8+
</picture>
9+
</a>
10+
<br/>
211

3-
A GitHub Action to [sync OpenAPI specifications with your Fern setup](/learn/api-definitions/openapi/sync-your-open-api-specification). Choose your scenario:
12+
<br/>
413

5-
- **Case 1: Sync from public URL (most common).** Your OpenAPI spec is hosted at a publicly available URL and you want to pull it into your fern folder. The GitHub Action uses `fern api update` to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file.
6-
- **Case 2: Sync between repositories**: Your OpenAPI spec lives in one repository and you want to sync it to another repository where your fern folder lives (like fern-config). The GitHub Action uses explicit file mappings to pull the latest version of your OpenAPI spec.
14+
[![GitHub Marketplace](https://img.shields.io/badge/GitHub%20Marketplace-Sync%20OpenAPI-blue?logo=github)](https://github.com/marketplace/actions/sync-openapi)
15+
![License](https://img.shields.io/badge/license-Apache%202.0-blue)
16+
[![Documentation](https://img.shields.io/badge/Read%20our%20Documentation-black?logo=book)](https://buildwithfern.com/learn/api-definitions/openapi/sync-your-open-api-specification?utm_source=fern-api/sync-openapi/readme-read-our-documentation)
17+
18+
</div>
19+
20+
# 🌿 sync-openapi
21+
22+
A GitHub Action to [sync OpenAPI specifications with your Fern setup](https://buildwithfern.com/learn/api-definitions/openapi/sync-your-open-api-specification). Choose your scenario:
23+
24+
- **Case 1: Sync from public URL (most common).** Your OpenAPI spec is hosted at a publicly available URL and you want to pull it into your fern folder. The GitHub Action uses `fern api update` to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file.
25+
- **Case 2: Sync between repositories**: Your OpenAPI spec lives in one repository and you want to sync it to another repository where your fern folder lives (like fern-config). The GitHub Action uses explicit file mappings to pull the latest version of your OpenAPI spec.
726

827
## Usage
928

@@ -112,14 +131,15 @@ The GitHub token used for this action must have:
112131

113132
## Releasing
114133

115-
This project uses GitHub Releases to publish new versions. When a release is published, a workflow automatically updates the major and minor version tags so consumers stay up to date.
134+
Tag the commit and publish a GitHub Release:
135+
136+
```sh
137+
git tag v4.0.1
138+
git push origin v4.0.1
139+
gh release create v4.0.1 --generate-notes
140+
```
116141

117-
For example, publishing release `v4.1.0` will:
118-
- Force-update the `v4` tag (so `@v4` users get the update)
119-
- Force-update the `v4.1` tag (so `@v4.1` users get the update)
142+
The [release workflow](.github/workflows/release.yml) automatically moves the major and minor version tags (e.g. `v4` and `v4.0`) to the new release so users pinned to `@v4` or `@v4.0` get the update immediately.
120143

121-
To release:
122-
1. Go to [Releases → Draft a new release](../../releases/new)
123-
2. Create a new tag (e.g., `v4.0.1`) following [semver](https://semver.org/)
124-
3. Click **Publish release**
144+
---
125145

0 commit comments

Comments
 (0)