-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3299d3f
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,79 @@ | ||
# Plasmic workflow v4 | ||
name: Sync, build and deploy Plasmic app | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
on: | ||
repository_dispatch: | ||
types: [plasmic] | ||
|
||
jobs: | ||
job: | ||
name: Sync, build and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
name: Checking out repository... | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- id: node | ||
name: Setting up node v18... | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
- id: cache | ||
name: Recovering cache... | ||
uses: actions/cache@v2 | ||
with: | ||
key: lock-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | ||
path: ${{ github.event.client_payload.data.directory }}/node_modules | ||
- id: init | ||
name: Initializing Plasmic app... | ||
uses: plasmicapp/plasmic-action@master | ||
with: | ||
run: init | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.event.client_payload.data.branch }} | ||
directory: ${{ github.event.client_payload.data.directory }} | ||
project_id: ${{ github.event.client_payload.data.projectId }} | ||
project_api_token: ${{ github.event.client_payload.data.projectApiToken }} | ||
platform: ${{ github.event.client_payload.data.platform }} | ||
language: ${{ github.event.client_payload.data.language }} | ||
scheme: ${{ github.event.client_payload.data.scheme }} | ||
title: ${{ github.event.client_payload.data.title }} | ||
description: ${{ github.event.client_payload.data.description }} | ||
- id: sync | ||
name: Syncing Plasmic project... | ||
if: ${{ github.event.client_payload.data.scheme == 'codegen' && steps.init.outputs.synced != 'true' }} | ||
uses: plasmicapp/plasmic-action@master | ||
with: | ||
run: sync | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.event.client_payload.data.branch }} | ||
directory: ${{ github.event.client_payload.data.directory }} | ||
project_id: ${{ github.event.client_payload.data.projectId }} | ||
project_api_token: ${{ github.event.client_payload.data.projectApiToken }} | ||
sync_action: ${{ github.event.client_payload.data.syncAction }} | ||
title: ${{ github.event.client_payload.data.title }} | ||
description: ${{ github.event.client_payload.data.description }} | ||
- id: build | ||
name: Building Plasmic app... | ||
if: ${{ github.event.client_payload.data.publish }} | ||
uses: plasmicapp/plasmic-action@master | ||
with: | ||
run: build | ||
branch: ${{ github.event.client_payload.data.branch }} | ||
directory: ${{ github.event.client_payload.data.directory }} | ||
platform: ${{ github.event.client_payload.data.platform }} | ||
- id: pr | ||
name: Creating pull request... | ||
uses: repo-sync/pull-request@v2 | ||
if: ${{ steps.sync.outputs.new_branch }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_branch: ${{ steps.sync.outputs.new_branch }} | ||
destination_branch: ${{ github.event.client_payload.data.branch }} |