Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
chore: setup repo (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: lilnasy <[email protected]>
  • Loading branch information
alexanderniebuhr and lilnasy authored Oct 16, 2023
1 parent bdca036 commit 57f0748
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "withastro/astro-adapters" }],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/---01-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "\U0001F41B Bug Report"
description: Report an issue or possible bug
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
## Quick Checklist
Thank you for taking the time to file a bug report! Please fill out this form as completely as possible.
✅ I am using a version of Node that Astro supports (`>=18.14.1`)
✅ I am using the **latest version of the adapter**.
✅ I am using the **latest version of Astro** and all integrations.
- type: textarea
id: astro-info
attributes:
label: Astro Info
description: Run the command `astro info` in your terminal and paste the output here. Please review the data before submitting in case there is any sensitive information you don't want to share.
render: block
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: bug-expectation
attributes:
label: What's the expected result?
description: Describe what you expect to happen.
validations:
required: true
- type: input
id: bug-reproduction
attributes:
label: Link to Minimal Reproducible Example
description: 'Use [astro.new](https://astro.new) to create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed. Not sure how to create a minimal example? [Read our guide](https://docs.astro.build/en/guides/troubleshooting/#creating-minimal-reproductions)'
placeholder: 'https://stackblitz.com/abcd1234'
validations:
required: true
- type: checkboxes
id: will-pr
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this issue.
required: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: 📘 Documentation
url: https://github.com/withastro/docs
about: File an issue or make an improvement to the docs website.
- name: 💡 Ideas for New Features, Improvements and RFCs
url: https://github.com/withastro/adapters/discussions
about: Propose and discuss future improvements to Astro
- name: 👾 Chat
url: https://astro.build/chat
about: Our Discord server is active, come join us!
- name: 💁 Support
url: https://astro.build/chat
about: 'This issue tracker is not for support questions. Join us on Discord for assistance!'
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Changes

- What does this change?
- Be short and concise. Bullet points can help!
- Before/after screenshots can help as well.
- Don't forget a changeset! `pnpm exec changeset`

## Testing

<!-- How was this change tested? -->
<!-- DON'T DELETE THIS SECTION! If no tests added, explain why. -->

## Docs

<!-- Could this affect a user’s behavior? We probably need to update README.md! -->
<!-- DON'T DELETE THIS SECTION! If no docs added, explain why.-->
46 changes: 46 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Format

on:
workflow_dispatch:
push:
branches:
- main

jobs:
format:
name: Format
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.GITHUB_TOKEN }}

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Format code
run: pnpm run format:ci

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci] format"
branch: ${{ github.head_ref }}
commit_user_name: astrobot-houston
commit_user_email: [email protected]
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
push:
branches:
- main

defaults:
run:
shell: bash

env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
FORCE_COLOR: true

jobs:
changelog:
name: Changelog PR or Release
if: ${{ github.repository_owner == 'withastro' }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v3

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build Packages
run: pnpm run build

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm run version
publish: pnpm exec changeset publish
commit: "[ci] release"
title: "[ci] release"
env:
# Needs access to push to main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Needs access to publish to npm
# NPM_TOKEN: ${{ secrets.CHANGESETS_RELEASE_PR_WORKFLOW_NPM_TOKEN }}

# - name: Generate Notification
# id: notification
# if: steps.changesets.outputs.published == 'true'
# run: message=$(node scripts/notify/index.js '${{ steps.changesets.outputs.publishedPackages }}') && echo ::set-output name=message::${message//$'\n'/'%0A'}

# - name: Discord Notification
# if: steps.changesets.outputs.published == 'true'
# id: discord-notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# uses: Ilshidur/[email protected]
# with:
# args: ${{ steps.notification.outputs.message }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"format": "pnpm run format:code",
"format:ci": "pnpm run format:imports && pnpm run format:code",
"format:code": "prettier -w \"**/*\" --ignore-unknown --cache",
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json",
"test": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
"benchmark": "astro-benchmark",
"lint": "eslint . --report-unused-disable-directives",
"version": "changeset version && node ./scripts/deps/update-example-versions.js && pnpm install --no-frozen-lockfile && pnpm run format",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format",
"preinstall": "npx only-allow pnpm"
},
"workspaces": [
Expand Down

0 comments on commit 57f0748

Please sign in to comment.