Skip to content

ci: remove extra comma #18

ci: remove extra comma

ci: remove extra comma #18

on:
workflow_dispatch:
push:
branches:
- main
jobs:
lint:
name: Lint and test project
runs-on: ubuntu-latest
steps:
- name: Checkout source project
uses: actions/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun lint
- run: bun test
template_update:
needs: lint
name: Update template repository
runs-on: ubuntu-latest
steps:
- name: Checkout source project
uses: actions/[email protected]
with:
path: ./source
- name: Checkout template project
uses: actions/[email protected]
with:
repository: SparkBotDev/SparkBot
token: ${{ secrets.ACTIONS_TOKEN }}
path: ./template
- name: Copy files to template
run: |
cd ./template
rm -rf *
cd ..
cp -rf ./source/lib ./template/lib
cp -rf ./source/sparks ./template/sparks
cp -rf ./source/types ./template/types
cp -f ./source/index.ts ./template/index.ts
cp -f ./source/sparkbot.config.ts ./template/sparkbot.config.ts
cp -f ./source/package.json ./template/package.json
cp -f ./source/README.md ./template/README.md
cp -f ./source/LICENSE ./template/LICENSE
cp -f ./source/tsconfig.json ./template/tsconfig.json
- name: Prepare package.json
uses: jaywcjlove/github-action-package@main
with:
path: ./template/package.json
unset: scripts,lint-staged,devDependencies
- name: Add types to package.json
uses: jaywcjlove/github-action-package@main
with:
path: ./template/package.json
data: |
{
"devDependencies": {
"@types/bun": "latest"
}
}
- name: Push template
run: |
cd ./template
git add .
git config user.name github-actions
git config user.email [email protected]
git commit -am "${{ github.event.head_commit.message }}"
git push