Skip to content

Commit

Permalink
feat: backend plugin
Browse files Browse the repository at this point in the history
BREAKING CHANGE: proxy is not more used, you have to use backend plugin with the processor.
  • Loading branch information
antoniomuso committed Jan 19, 2023
1 parent bdcd1b8 commit 3597c2c
Show file tree
Hide file tree
Showing 68 changed files with 19,574 additions and 47,959 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/backmerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Backmerge main -> next

on:
push:
branches:
- 'main'

jobs:
backmerge:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Merge main -> next
uses: devmasx/merge-branch@master
with:
type: now
from_branch: main
target_branch: next
github_token: ${{ secrets.GH_NODE_TOKEN }}
message: "Merge 'main' into 'next' [skip ci]"
65 changes: 43 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,57 @@ name: Release
on: [workflow_dispatch]

jobs:
test:
name: Run tests
uses: ./.github/workflows/test.yml

release:
needs: [test]
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18

- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_NODE_TOKEN }}
persist-credentials: false
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16
# setting this should create the npmrc with $NODE_AUTH_TOKEN
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm set-script prepare ''
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GH_NODE_TOKEN }}@github.com/${{ github.repository }}
- name: Install dependencies
run: npm i
- name: Bootstrap lerna
run: yarn

- name: Build
run: npm run build
- name: Lerna build
run: yarn build

- name: Semantic release
uses: codfish/semantic-release-action@v2
- name: Bump release
if: github.ref == 'refs/heads/main'
run: yarn version:release
env:
GITHUB_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GIT_AUTHOR_NAME: '${{ github.actor }}'
GIT_COMMITTER_NAME: '${{ github.actor }}'
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Bump prerelease
if: github.ref != 'refs/heads/main'
run: yarn version:prerelease
env:
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish packages
run: yarn publish:ci
env:
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: merge main -> next
uses: actions/setup-node@v3
with:
type: now
from_branch: main
target_branch: next
github_token: ${{ secrets.GH_NODE_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ jobs:
node-version: 18.x

- name: Install dependencies
run: npm it
run: yarn

- name: Test
run: yarn test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ yarn-error.log*
lerna-debug.log*

#lock
yarn.lock
package-lock.json
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": true,
"useWorkspaces": true,
"npmClient": "yarn",
"version": "3.0.0"
}
Loading

0 comments on commit 3597c2c

Please sign in to comment.