Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ jobs:
exit 1
fi

# The release notes come from CHANGELOG.md, not from generated commit titles, so a
# missing entry is a missing release note. Fail here rather than after the upload.
- name: Extract the release notes
run: |
set -euo pipefail
awk -v ver="${{ inputs.version }}" '
$0 == "## " ver { found = 1; next }
found && /^## / { exit }
found { print }
' CHANGELOG.md > release-notes.md
if [ ! -s release-notes.md ]; then
echo "::error::CHANGELOG.md has no '## ${{ inputs.version }}' section. Add one describing the contract change before publishing."
exit 1
fi
echo "Release notes for ${{ inputs.version }}:"
cat release-notes.md

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4

Expand Down Expand Up @@ -122,7 +139,7 @@ jobs:
run: |
gh release create "${{ inputs.version }}" \
--title "${{ inputs.version }}" \
--generate-notes
--notes-file release-notes.md

- name: Summary
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ local.properties

# Pinned codegen toolchain, installed by scripts/install-swift-toolchain.sh.
.tools/

# Written by publish.yml when it extracts release notes from CHANGELOG.md
release-notes.md
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

Contract changes from a consumer's point of view: what appeared, what changed shape, and what breaks
if you upgrade. Field and enum renumbering matters more than its diff size suggests, so it gets
called out explicitly even when nothing else did.

`publish.yml` reads the section matching the version it is publishing and uses it as the GitHub
release notes, so a version with no entry here does not release. Write the entry in the same PR that
syncs the contract, while the diff is still in front of you.

## 0.1.0

First release. The Flipcash contract is now generated once here and published for both platforms,
replacing the copies each app vendored and generated for itself.

- Kotlin, on Maven Central as `com.flipcash:flipcash2-client-protocol`, under
`com.codeinc.flipcash.gen.*`.
- Swift, as the `Flipcash2ClientProtocol` module. The git tag is the SPM release.