Skip to content

Commit

Permalink
cleanup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Adammatthiesen committed Nov 29, 2024
1 parent 7828728 commit 08210d4
Show file tree
Hide file tree
Showing 19 changed files with 318 additions and 357 deletions.
18 changes: 18 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Install Tools & Dependencies
description: Installs pnpm, Node.js & package dependencies

runs:
using: composite
steps:
- name: Setup pnpm (corepack enabled)
uses: pnpm/action-setup@v3

- name: Setup Node.js 20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm ci:install
shell: bash
66 changes: 0 additions & 66 deletions .github/workflows/changesets.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/ci-first-time-contributor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI - First Time Contributor

on:
issues:
types: [opened]
pull_request_target:
types: [opened, closed]

jobs:
check_for_first_interaction:
name: Check for First Interaction
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: First Interaction Check
uses: zephyrproject-rtos/action-first-interaction@7e6446f8439d8b4399169880c36a3a12b5747699
with:
repo-token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
issue-message: >
Hi @${{ github.event.issue.user.login }} 👋
Welcome to the StudioCMS project! We're excited to have you here. Thanks for opening your first issue! 🎉
If you have not already and your issue is related to a bug, please make sure to include the following information in your issue:
- A clear description of the issue
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- StudioCMS version
- Environment details (OS, hardware, etc.)
If you have any questions or need help, feel free to ask. We're here to help you! 🚀
If you're interested in contributing to the project, please check out our [Contributing Guide](https://github.com/withstudiocms/.github/blob/main/CONTRIBUTING.md) and join our [Discord community](https://chat.studiocms.dev) to stay in the loop for any future help we may need!
Thanks again for opening your first issue! 🙌
- The StudioCMS Team
pr-opened-message: >
Hello @${{ github.event.pull_request.user.login }}, and thank you for opening your first pull request to StudioCMS! 🎉
If you have not already, please make sure to review the project's [Contributing Guide](https://github.com/withstudiocms/.github/blob/main/CONTRIBUTING.md) to ensure your pull request meets our quality standards.
We're excited to have you here and appreciate your contribution. If you have not already, please make sure to include the following information in your pull request:
- A clear description of the changes
- Steps to reproduce the issue (if applicable)
- Any relevant screenshots or logs
Our team will review your pull request as soon as possible. If you have any questions or need help, feel free to ask. We're here to help you! 🚀
In the meantime, you will notice that a few checks will run on your pull request. These checks are automated and help us ensure that your changes meet our quality standards. If you see any errors or warnings, don't worry! Our team will help you address them. 😊
pr-merged-message: >
**Congrats and Welcome** @${{ github.event.pull_request.user.login }} to the Contributor Squad! 🎉
If you haven't already, please join our [Discord community](https://chat.studiocms.dev) to stay in the loop for any future help we may need!
- The StudioCMS Team
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
name: Remove labels from merged PRs and issues
name: CI - Label Management

on:
pull_request_target:
types:
- closed
issues:
types:
- closed

permissions:
contents: read
pull-requests: write
issues: write

jobs:
add-labels:
name: Label PRs
if: github.event_name == 'pull_request_target' && github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
steps:
- name: Label PRs
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.STUDIOCMS_SERVICE_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: true

remove-merged-pr-labels:
name: Remove merged pull request labels
if: github.event.pull_request.merged
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/ci-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Comment on Pull Request

on:
pull_request:
types: [opened, reopened]

jobs:
post-deployment-links:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
message: |
Thanks for opening this pull request! 🎉
The following links will become available for preview shortly (if applicable):
- [StudioCMS Documentation](https://pr${{ github.event.pull_request.number }}.docs.studiocms.dev/)
- [StudioCMS Demo (playgrounds/node)](https://pr${{ github.event.pull_request.number }}.demo.studiocms.dev/)
- [StudioCMS Ui Demo (playgrounds/ui)](https://pr${{ github.event.pull_request.number }}.ui-testing.studiocms.dev/)
TEMPORARILY DISABLED: The StudioCMS Demo (playgrounds/node) link is currently disabled due to ongoing development on the next version. We apologize for the inconvenience and appreciate your understanding. 🙏
- [StudioCMS Next-Demo (playgrounds/node)](https://pr${{ github.event.pull_request.number }}.next-demo.studiocms.dev/) (Temporarily available for preview's on the next version)
Note: Changes may take a few minutes to propagate. Please be patient! You can also see the status of each deployment via the withstudiocms-deployments bot 🤖 comments.
Please review the changes and provide any feedback. Thanks! 🚀
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Translation Changesets

on:
pull_request:
types: [labeled, synchronize]
pull_request:
types: [labeled, synchronize]

permissions:
contents: write
Expand All @@ -18,18 +18,8 @@ jobs:
ref: ${{ github.head_ref }}
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}

- name: Setup pnpm (corepack enabled)
uses: pnpm/action-setup@v3

- name: Setup Node.js 20.x
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm ci:install
shell: bash
- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Create Translation Changesets
run: pnpm translations:changeset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lunaria
name: CI - Lunaria Overview Generation on PRs

on:
pull_request_target:
Expand All @@ -20,16 +20,8 @@ jobs:
fetch-depth: 0
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}

- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Setup PNPM
uses: pnpm/action-setup@v3

- run: pnpm install
- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Generate Lunaria Overview
uses: lunariajs/action@astro-docs
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci-pr-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI - Snapshot Release on PRs

on:
pull_request:
paths:
- 'packages/**'

jobs:
release:
name: Pkg-pr-new Snapshot Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Publish packages
run: pnpm ci:snapshot

Loading

0 comments on commit 08210d4

Please sign in to comment.