Skip to content
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

v6.0.23 #1099

Merged
merged 6 commits into from
Jan 14, 2024
Merged

v6.0.23 #1099

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
51 changes: 51 additions & 0 deletions .github/actions/trigger-e2e-test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Trigger E2E Action
description: Trigger E2E workflow for a specific version

inputs:
version:
description: 'Version'
required: true
sha:
description: 'Commit SHA'
required: true
bot_app_id:
description: 'Bot App Id'
required: true
bot_app_key:
description: 'Bot App Key'
required: true

runs:
using: "composite"
steps:
- id: create_bot_token
name: Create bot token
uses: wow-actions/use-app-token@v2
with:
app_id: ${{ inputs.bot_app_id }}
private_key: ${{ inputs.bot_app_key }}
- name: "Trigger E2E tests"
uses: actions/github-script@v5
env:
version: ${{ inputs.version }}
sha: ${{ inputs.sha }}
with:
github-token: ${{ steps.create_bot_token.outputs.BOT_TOKEN }}
script: |
const {sha, version} = process.env;
const repo = 'frontegg-react'
const owner = 'frontegg'
const e2eRepo = 'e2e-system-tests'
const workflow_id = 'frontegg-react-e2e-tests.yml'
const dispatch_id = `${repo}/${sha}`

github.rest.actions.createWorkflowDispatch({
owner,
repo: e2eRepo,
workflow_id,
ref: 'master',
inputs: {
version,
dispatch_id,
}
})
23 changes: 8 additions & 15 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ jobs:
return version;
- name: Commit changes
shell: bash -ex {0}
id: 'cpr_commit_sha'
run: |
git add . && git commit -m "chore(release): publish ${{ steps.incremented-version.outputs.result }}"
echo "sha=$(git rev-parse HEAD)\n" >> $GITHUB_OUTPUT
- name: Create Release Pull Request
id: cpr
uses: peter-evans/[email protected]
Expand Down Expand Up @@ -122,19 +124,10 @@ jobs:
const checkNpmVersions = require('./scripts/wait-for-npm-indexing.js');
await checkNpmVersions(github, ['@frontegg/react'], checkingVersion);

- name: Prepare E2E test workflow
uses: actions/github-script@v5
env:
PR_REF: '${{ steps.cpr.outputs.pull-request-head-sha }}'
PR_VERSION: '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}'
- name: "Call trigger-e2e-test action"
uses: ./.github/actions/trigger-e2e-test
with:
script: |
const sha = process.env.PR_REF;
const repo = context.payload.repository.name
const owner = context.payload.repository.organization

const res = await github.rest.repos.createCommitStatus({
context, owner, repo, sha,
state: 'pending',
description: 'Dispatching E2E tests...',
});
version: ${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}
sha: ${{ steps.cpr_commit_sha.outputs.sha }}
bot_app_id: ${{ secrets.GH_FRONTEGG_BOT_APP_ID }}
bot_app_key: ${{ secrets.GH_FRONTEGG_BOT_APP_SECRET }}
69 changes: 26 additions & 43 deletions .github/workflows/trigger-e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,33 @@
name: Trigger E2E tests Workflow
name: "(▶) Trigger E2E tests Workflow"

on:
push:
branches:
- 'release/next'
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
sha:
description: 'Commit SHA'
required: true

jobs:
trigger_e2e_tests:
name: "Trigger E2E tests Workflow"
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'
steps:
- id: create_bot_token
name: Create bot token
uses: wow-actions/use-app-token@v2
with:
app_id: ${{ secrets.GH_FRONTEGG_BOT_APP_ID }}
private_key: ${{ secrets.GH_FRONTEGG_BOT_APP_SECRET }}
- name: "get test version"
uses: actions/github-script@v6
id: 'react_version'
with:
result-encoding: string
script: |
const {default: fs} = await import('fs');
const {version} = JSON.parse(fs.readFileSync('./lerna.json', {encoding: "utf-8"}));
return version;
- name: "Trigger E2E tests on ${{ steps.react_version.outputs.result }}"
uses: actions/github-script@v5
env:
version: ${{ steps.react_version.outputs.result }}
sha: ${{ github.sha }}
- uses: actions/checkout@v4

- name: "Print inputs"
run: |
echo "Received test request for @frontegg/react@${{ inputs.version }}"
echo "From: ${{ inputs.dispatch_id }}"

- name: "Call trigger-e2e-test action"
uses: ./.github/actions/trigger-e2e-test
with:
github-token: ${{ steps.create_bot_token.outputs.BOT_TOKEN }}
script: |
const { sha, version} = process.env;
const owner = 'frontegg'
const e2eRepo = 'e2e-system-tests'
const workflow_id = 'frontegg-react-e2e-tests.yml'
const dispatch_id = `frontegg-react/${sha}`

github.rest.actions.createWorkflowDispatch({
owner,
repo: e2eRepo,
workflow_id,
ref: 'master',
inputs: {
version,
dispatch_id,
}
})
version: ${{ inputs.version }}
sha: ${{ inputs.sha }}
bot_app_id: ${{ secrets.GH_FRONTEGG_BOT_APP_ID }}
bot_app_key: ${{ secrets.GH_FRONTEGG_BOT_APP_SECRET }}


8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## [6.0.23](https://github.com/frontegg/frontegg-react/compare/v6.0.22...v6.0.23) (2024-1-14)

- FR-14855 - Add support for social login consent, by default it's false.


### React Wrapper 6.0.23:
- FR-13416 - add push trigger for e2e workflow

## [6.0.22](https://github.com/frontegg/frontegg-react/compare/v6.0.21...v6.0.22) (2024-1-10)

- FR-14813 - Add support for open app page with basename
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "6.0.22",
"version": "6.0.23",
"npmClient": "yarn",
"useWorkspaces": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/demo-saas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@frontegg/demo-saas",
"version": "6.0.22",
"version": "6.0.23",
"private": true,
"author": "Frontegg LTD",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"test": "echo 'No Unit Tests'"
},
"dependencies": {
"@frontegg/react": "^6.0.22",
"@frontegg/react": "^6.0.23",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.3.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frontegg/react",
"libName": "FronteggReact",
"version": "6.0.22",
"version": "6.0.23",
"author": "Frontegg LTD",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/sdkVersion.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default { version: '6.0.22' };
export default { version: '6.0.23' };
2 changes: 1 addition & 1 deletion packages/sanity-check/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontegg-react-sanity-check",
"private": true,
"version": "6.0.22",
"version": "6.0.23",
"scripts": {
"build": "docker-compose build test",
"build:dev": "docker-compose build test --no-cache",
Expand Down
Loading