From 1cb355f8da6010582db095752f8286d084bd2222 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Thu, 22 Aug 2024 14:57:33 -0300 Subject: [PATCH 1/3] feat: improve readme and add dependabot --- .github/dependabot.yml | 11 +++++ README.md | 101 ++++++++++++++++++++++++++++------------- 2 files changed, 80 insertions(+), 32 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4724e0c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + diff --git a/README.md b/README.md index 6a98cde..898cfeb 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,75 @@ -# react-typescript-todolist +# Project Name -[Udemy Course] This is React App with TypeScript and CSS modules +[![License](https://img.shields.io/github/license/username/repo.svg)](LICENSE) +[![Build Status](https://img.shields.io/github/actions/workflow/status/username/repo/build.yml)](https://github.com/username/repo/actions) -# Tech stack -- [ ] Back-end -- [x] Front-end -- [ ] Docker -- [ ] Database related -- [ ] Testing -- [ ] Maven -- [x] NPM -- [ ] Java related -- [x] JavaScript/TypeScript/React related -- [ ] Shell scripting +## 📋 Table of Contents -# Experimental stuff -- [ ] Clojure -- [ ] Wildfly -- [ ] IndexedDb -- [ ] PHP -- [ ] Slim Framework -- [ ] KnockoutJS -- [ ] ServiceWorker -- [ ] Authentication -- [ ] NodeJS +- [About the Project](#about-the-project) +- [Features](#features) +- [Tech Stack](#tech-stack) +- [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) -# The course -- Title: TypeScript from basic to advanced (w/ React, Express) -- Subtitle: Learn TypeScript in practice, integrating with various market Frameworks (React, Express) and even creating projects! -- Author: Matheus Battisti -- Link: https://www.udemy.com/course/typescript-do-basico-ao-avancado-c-react-express/ +## 📝 About the Project +Simple TODO app written in React. -- React -- TypeScript -- Featuring - - CSS as modules +TODO: add GIF or screenshot of the app + +## ✨ Features + +- Create TODO items +- Edit TODO items +- Mark items as completed + +## 🚀 Tech Stack + +- **Frontend:** React, TypeScript, Vite. +- **Backend:** Not applicable. +- **Database:** Not applicable. +- **Other Technologies:** Docker, Caddy. + +## 🛠 Installation + +1. Clone the repo + ```sh + git clone https://github.com/ricardo-campos-org/react-typescript-todolist + ``` +2. Install NPM packages + ```sh + npm install + ``` +3. Start the development server + ```sh + npm start + ``` + +## 🎮 Usage + +Once you're in the home screen, you can click the button to create your first TODO item. + +## 🤝 Contributing + +Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +### Steps to Contribute: + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feat/amazing-feature`) +3. Commit your Changes (`git commit -m 'Add some amazing feature'`) +4. Push to the Branch (`git push origin feat/amazing-feature`) +5. Open a Pull Request + +## 📄 License + +Distributed under the MIT License. See `LICENSE` for more information. + +## 📞 Contact + +Your Name - [@your_twitter](https://twitter.com/RicardoMpcInc) + +Project Link: [GitHub Repository](https://github.com/ricardo-campos-org/react-typescript-todolist) From 191950fdc83584f904d20d8d3f2dadfbd49403ce Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Thu, 22 Aug 2024 15:33:26 -0300 Subject: [PATCH 2/3] ci: add workflows --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++ .github/workflows/main.yml | 52 ++++++++++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 35 +++++++++++++++++++++++++ package-lock.json | 4 +-- package.json | 2 +- 5 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e0cebe8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: + - '*' + - '*/*' + +concurrency: + group: ${{ github.event.number }} + cancel-in-progress: true + +jobs: + code-checks: + name: Code Checks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Clean and Install + run: npm ci + - name: Build + run: npm run build + #- name: Lint + # run: npm run lint + #- name: Unit tests + # run: npm run test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cdc127b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,52 @@ +name: Main + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + release: + name: Auto release + runs-on: ubuntu-latest + outputs: + version: ${{ steps.changelog.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + fetch-depth: 0 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Conventional Changelog Update + uses: TriPSs/conventional-changelog-action@v5 + id: changelog + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + output-file: 'CHANGELOG.md' + skip-version-file: 'true' + skip-commit: 'true' + git-push: 'false' + skip-on-empty: 'false' + - name: Set new version + run: | + echo "::set-output name=version::${{ steps.changelog.outputs.version }}" + npm version minor + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: Ci Bot + author_email: cibot@users.noreply.github.com + message: 'doc: updating pom to ${{ steps.changelog.outputs.version }} [ci skip]' + add: '["packages.json","CHANGELOG.md"]' + - name: Create Release + uses: ncipollo/release-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag: ${{ steps.changelog.outputs.tag }} + name: ${{ steps.changelog.outputs.tag }} + body: ${{ steps.changelog.outputs.clean_changelog }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..7d36499 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,35 @@ +name: PR + +on: + push: + branches: + - '*' + - '*/*' + +concurrency: + group: ${{ github.event.number }} + cancel-in-progress: true + +jobs: + code-checks: + name: Code Checks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Clean and Install + run: npm ci + - name: Build + run: npm run build + #- name: Lint + # run: npm run lint + #- name: Unit tests + # run: npm run test diff --git a/package-lock.json b/package-lock.json index 3222de7..f4548e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "12_todo_react", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "12_todo_react", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", diff --git a/package.json b/package.json index 82e936e..636c7d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "12_todo_react", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.5", From 4be5722f5b97b899c8ebfd091e1514312795cee5 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Thu, 22 Aug 2024 15:34:35 -0300 Subject: [PATCH 3/3] ci: pr workflow fix --- .github/workflows/pr.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7d36499..e1336d8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,10 +1,7 @@ name: PR on: - push: - branches: - - '*' - - '*/*' + pull_request: concurrency: group: ${{ github.event.number }}