tools: Add publishing to Open VSX #699
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
name: CI [boxel-motion] | |
on: | |
pull_request: | |
paths: | |
- "packages/boxel-motion/**" | |
- ".github/workflows/pr-boxel-motion.yml" | |
- "package.json" | |
- "pnpm-lock.yaml" | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
id-token: write | |
statuses: write | |
jobs: | |
check-if-requires-preview: | |
name: Check if a preview deploy is required | |
runs-on: ubuntu-latest | |
outputs: | |
boxel-motion-files-changed: ${{ steps.boxel-motion-files-that-changed.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get boxel-motion files that changed | |
id: boxel-motion-files-that-changed | |
uses: tj-actions/changed-files@v39 | |
with: | |
files: | | |
packages/boxel-motion/** | |
deploy-motion-preview-staging: | |
name: Deploy a boxel-motion staging preview to S3 | |
runs-on: ubuntu-latest | |
# github.event.pull_request.head.repo.full_name == github.repository: true if pr is from the original repo, false if it's from a fork | |
# github.head_ref: the branch that the pull request is from. only appears on pull_request events | |
if: github.event.pull_request.head.repo.full_name == github.repository && github.head_ref && needs.check-if-requires-preview.outputs.boxel-motion-files-changed == 'true' | |
needs: check-if-requires-preview | |
concurrency: deploy-motion-preview-staging-${{ github.head_ref || github.run_id }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::680542703984:role/boxel-motion | |
aws-region: us-east-1 | |
- name: Deploy boxel-motion preview | |
uses: ./.github/actions/deploy-ember-preview | |
env: | |
S3_PREVIEW_BUCKET_NAME: boxel-motion-preview.stack.cards | |
AWS_S3_BUCKET: boxel-motion-preview.stack.cards | |
AWS_REGION: us-east-1 | |
AWS_CLOUDFRONT_DISTRIBUTION: E25VU6BCHNF7AR | |
with: | |
package: boxel-motion | |
environment: staging |