Skip to content

Commit

Permalink
Merge pull request #91 from fingerprintjs/feature/INTER-544-revisit
Browse files Browse the repository at this point in the history
[INTER-544] Revisit pre-release
  • Loading branch information
TheUnderScorer authored Mar 25, 2024
2 parents 64c90be + 57c8824 commit b827e9c
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 4,173 deletions.
64 changes: 5 additions & 59 deletions .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,11 @@
name: Analyze Commit Messages
on: [pull_request]
on:
pull_request:

permissions:
pull-requests: write
contents: write
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
id: commitlint
- if: ${{ failure() && steps.commitlint.outcome == 'failure' }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: Commitlint
recreate: true
message: |
## Wrong commit message format detected
We use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) in our project.
> **Warning**
> Probably you forgot to activate local git hooks.
Run the next command in the project root to activate local hooks:
```sh
sh ./install_hooks.sh
```
More info you can find in [job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
- if: ${{ success() }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: Commitlint
hide: true
hide_classify: "OUTDATED"
release-notes-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Collect semantic-release-info
id: semantic_release_info
uses: fingerprintjs/action-semantic-release-info@v1
- if: ${{ steps.semantic_release_info.outputs.no_release == 'false' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will create a ${{steps.semantic_release_info.outputs.type}} release :rocket:
${{steps.semantic_release_info.outputs.notes}}
- if: ${{ steps.semantic_release_info.outputs.no_release == 'true' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will not create a new release :rocket:
analyze-commits:
name: Analyze commits
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
20 changes: 11 additions & 9 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2" ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup PHP
Expand All @@ -36,11 +36,13 @@ jobs:
FP_API_HOST: "${{ secrets.FP_API_HOST }}"
FP_VISITOR_ID: "${{ secrets.FP_VISITOR_ID }}"
FP_REQUEST_ID: "${{ secrets.FP_REQUEST_ID }}"
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@0d9c6ff1de9903da88d24c0564f6e83cb28faca9
with:
status: ${{ job.status }}
notification_title: 'PHP ${{ matrix.php_version }} SDK Functional Test has {status_message}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

report-status:
needs: tests
if: always()
uses: fingerprintjs/dx-team-toolkit/.github/workflows/report-workflow-status.yml@v1
with:
notification_title: 'PHP SDK Tests has {status_message}'
job_status: ${{ needs.tests.result }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
47 changes: 13 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,20 @@
name: Release

name: 'Release'
on:
push:
branches:
- main
- develop
- main

jobs:
release:
name: Release Version
runs-on: "ubuntu-latest"
environment: production

steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '11'

- uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
coverage: none
tools: composer:v2

- name: Install Composer Dependencies
run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist

- name: Install Yarn dependencies
run: yarn install --cwd=release

- name: Release
run: ./release/node_modules/.bin/semantic-release --extends ./release/.releaserc.js
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
HUSKY: 0
name: 'Publish new version'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-server-sdk.yml@v1
with:
language: php
language-version: '8.3'
prepare-command: |
composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist
appId: ${{ vars.APP_ID }}
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

strategy:
matrix:
php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2" ]
php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
File renamed without changes.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git

This library supports the following PHP implementations:

- PHP 7.1
- PHP 7.2
- PHP 7.3
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3

We currently don't support external PHP Runtimes like:

Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<phpunit bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="false"
convertWarningsToExceptions="false"
stopOnFailure="false">
<testsuites>
<testsuite name="FingerprintAPI Test">
Expand Down
15 changes: 0 additions & 15 deletions release/package.json

This file was deleted.

Loading

0 comments on commit b827e9c

Please sign in to comment.