-
Notifications
You must be signed in to change notification settings - Fork 2
feat!: rebuild the client on API specification 2.26.1 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: CI | ||
|
|
||
| # Build and load checks. Everything that needs a credential runs elsewhere and reports | ||
| # back as a commit status, so no secret is reachable from this workflow. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master, main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: build (php ${{ matrix.php }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: ['8.2', '8.3', '8.4'] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| - run: composer install --no-interaction --no-progress | ||
| - name: Lint every source file | ||
| run: find src -name '*.php' -print0 | xargs -0 -n1 php -l > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Release | ||
|
|
||
| # PHP has no publish step: Packagist reads the tag pushed by tag-on-merge.yml and needs no | ||
| # credential (FR-021a). This workflow only asserts the tag and the manifest agree, so a mismatched | ||
| # release is caught here rather than silently published by Packagist. | ||
|
|
||
| on: | ||
| push: | ||
| tags: ['v[0-9]+.[0-9]+.[0-9]+'] | ||
|
|
||
| permissions: | ||
| contents: write # create the GitHub release | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: The tag must match the packaged version | ||
| run: | | ||
| # Every tag in this repository, and in api-reference, carries the v. The version | ||
| # inside the package never does, so the tag is compared with it stripped. | ||
| TAG="${GITHUB_REF_NAME#v}" | ||
| PKG="$(cat VERSION)" | ||
| [ "$TAG" = "$PKG" ] || { echo "tag $TAG != VERSION $PKG"; exit 1; } | ||
| echo "Packagist will pick up tag $TAG from its repository webhook." | ||
|
|
||
| # The tag alone left the repository's Releases page showing a version from years ago as | ||
| # "Latest", which is what anyone browsing the repository sees first. The notes come from the | ||
| # CHANGELOG section for this version, so the release says what changed rather than nothing. | ||
| - name: Publish the GitHub release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| VERSION="${GITHUB_REF_NAME#v}" | ||
| NOTES="$(awk -v v="$VERSION" ' | ||
| $0 ~ "^## \\[?" v "\\]?" { found = 1; next } | ||
| found && /^## / { exit } | ||
| found { print } | ||
| ' CHANGELOG.md)" | ||
| [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for $VERSION." | ||
| # Creating one that exists is an error, and a re-run of a release that already happened | ||
| # should be a no-op rather than a red build. | ||
| if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then | ||
| echo "Release $GITHUB_REF_NAME already exists; nothing to do." | ||
| else | ||
| gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes "$NOTES" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Tag on merge | ||
|
|
||
| # Merging is what creates the version tag, and the tag is what publishes (FR-007f, FR-019a). | ||
| # A breaking release waits for a human to merge, which is how the FR-019 approval is expressed. | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master, main] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| tag: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| # SDK_RELEASE_TOKEN, not the automatic GITHUB_TOKEN. GitHub does not start a workflow run for | ||
| # an event created with GITHUB_TOKEN, so a tag pushed with it would never trigger release.yml | ||
| # and nothing would ever publish. That failure is silent: the tag appears, the release | ||
| # workflow simply never runs. Needs contents:write on this repository. | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.SDK_RELEASE_TOKEN }} | ||
| - name: Tag the version if it is new | ||
| run: | | ||
| test -n "${{ secrets.SDK_RELEASE_TOKEN }}" || { | ||
| echo "SDK_RELEASE_TOKEN is not set: the tag would not trigger release.yml"; exit 1; | ||
| } | ||
| # v-prefixed, matching every tag this repository and api-reference already carry. | ||
| # The version inside the package stays bare; only the git tag is prefixed. | ||
| VERSION="v$(cat VERSION)" | ||
| if git rev-parse "$VERSION" >/dev/null 2>&1; then | ||
| echo "Tag $VERSION already exists, nothing to do." | ||
| exit 0 | ||
| fi | ||
| git config user.name "Flat SDK bot" | ||
| git config user.email "developers@flat.io" | ||
| git tag -a "$VERSION" -m "Release $VERSION" | ||
| git push origin "$VERSION" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every automatically created release uses
git tag -a, whichgit tag -hidentifies as an annotated tag, while-sis the option for an annotated and GPG-signed tag. As a result, the README'sgit verify-tagcommand reports that no signature was found and the tag provides none of the promised signed provenance; sign the tag or remove the signature-verification claim.Useful? React with 👍 / 👎.