Repository navigation
Add OpenAPI compatibility handoffs and preserve generated line endings #32
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
| name: Version | |
| # Keeps Discord::VERSION in step with the release tags (scripts/check-version.php). On a pull request or a | |
| # push it must not be older than the latest release; on a published release it must equal the release's tag. | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| version: | |
| name: Discord::VERSION | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # All tags, to find the latest release. | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - name: Check against the latest release | |
| if: github.event_name != 'release' | |
| run: php scripts/check-version.php | |
| - name: Check against this release | |
| if: github.event_name == 'release' | |
| env: | |
| RELEASE_TAG: ${{ github.event.release.tag_name }} | |
| run: php scripts/check-version.php "$RELEASE_TAG" |