-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add workflow to template cleanup.
- Loading branch information
Showing
5 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Upload coverage reports to Codecov | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Generate coverage reports | ||
run: npm run coverage | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: %AUTHOR%/%NAME% |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Uncomment the following after cloning | ||
- name: No operation | ||
run: echo "No operation" | ||
# - uses: google-github-actions/release-please-action@v3 | ||
# with: | ||
# release-type: node | ||
# package-name: %NAME% | ||
# bump-minor-pre-major: true | ||
# bump-patch-for-minor-pre-major: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# %NAME% | ||
|
||
[![npm version](https://badge.fury.io/js/%NAME%.svg)](https://badge.fury.io/js/%NAME%) | ||
![build](https://github.com/%AUTHOR%/%NAME%/workflows/Build/badge.svg) | ||
[![codecov](https://codecov.io/gh/%AUTHOR%/%NAME%/graph/badge.svg?token=RHP9TB2F51)](https://codecov.io/gh/%AUTHOR%/%NAME%) | ||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
|
||
## Overview | ||
|
||
%DESCRIPTION% | ||
|
||
## Notes | ||
|
||
## Installation | ||
|
||
You can install this library using npm: | ||
|
||
```shell | ||
npm install %NAME% | ||
``` | ||
|
||
## Usage | ||
|
||
## Link | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>%NAME%</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/example/main.ts"></script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# GitHub Actions Workflow responsible for cleaning up the WXT React Template repository from the template-specific files and configurations. | ||
# This workflow is supposed to be triggered automatically when a new template-based repository has been created. | ||
|
||
name: Template Cleanup | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
# Run a cleaning process only if the workflow is triggered by the non-"npm-package-template" repository. | ||
template-cleanup: | ||
name: Template Cleanup | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.name != 'npm-package-template' | ||
permissions: | ||
contents: write | ||
steps: | ||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
# Cleanup project | ||
- name: Cleanup | ||
uses: ryohidaka/nodejs-cleanup@v1.1.3 | ||
with: | ||
description: "" | ||
excluded: "CHANGELOG, .github/FUNDING.yml, .github/workflows/template-cleanup.yml" | ||
template-dir: ".github/template" | ||
remove-template-dir: true |