chore: Publish preview release + deploy staging every 3 hours (#7341)
* wip * Wrap up * Update .github/workflows/trigger-staging-deployment.yml Co-authored-by: Sebastian Rindom <skrindom@gmail.com> * enable schedule --------- Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
This commit is contained in:
15
.github/workflows/trigger-release.yml
vendored
15
.github/workflows/trigger-release.yml
vendored
@@ -19,13 +19,14 @@ on:
|
||||
- "docs/**"
|
||||
- "www/**"
|
||||
- ".github/**"
|
||||
|
||||
schedule:
|
||||
- cron: "0 */3 * * *"
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Trigger Release
|
||||
name: Trigger Preview Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
@@ -50,16 +51,16 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build all packages
|
||||
run: yarn build
|
||||
|
||||
- name: Version packages
|
||||
run: yarn changeset version --snapshot ${{ github.event.inputs.version }}
|
||||
run: yarn changeset version --snapshot ${{ github.event.inputs.version || 'preview' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --no-immutable
|
||||
|
||||
- name: Build all packages
|
||||
run: yarn build
|
||||
|
||||
- name: Publish packages under next tag
|
||||
run: yarn changeset publish --no-git-tags --snapshot --tag ${{ github.event.inputs.version }}
|
||||
run: yarn changeset publish --no-git-tags --snapshot --tag ${{ github.event.inputs.version || 'preview' }}
|
||||
|
||||
18
.github/workflows/trigger-staging-deployment.yml
vendored
Normal file
18
.github/workflows/trigger-staging-deployment.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Trigger Staging Deployment
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Trigger Release and Publish]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.STAGING_DEPLOY_ACCESS_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/medusajs/staging/actions/workflows/deploy.yml/dispatches \
|
||||
-d '{"ref":"main"}'
|
||||
Reference in New Issue
Block a user