-
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.
chore(github): migrate CI/CD workflows to Deno
Replaced Node.js and pnpm-based workflows with Deno equivalents across setup, testing, publishing, and release actions. Updated cache management, linter, and dependency installation steps to align with Deno's ecosystem. Simplified processes for consistency and modernized pipelines to better support the new toolchain. Signed-off-by: suddenlyGiovanni <15946771+suddenlyGiovanni@users.noreply.github.com>
- Loading branch information
1 parent
d355737
commit 9ae4541
Showing
7 changed files
with
131 additions
and
107 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,24 @@ | ||
# CI/CD | ||
|
||
# Requirements: | ||
|
||
- git `main` branch must only composed of released versions (tags) | ||
- each change ending merged in main needs to: | ||
- change the semver version number | ||
- update the change log with corresponding description | ||
- tag that commit with corresponding version number | ||
|
||
```mermaid | ||
graph TB | ||
A[Start: Pull Request Created or Updated] --> B{Run Tests and Linters} | ||
B -->|Tests Pass| C[Pull Request Merged] | ||
B -->|Tests Fail| D[Fix Issues and Update Pull Request] | ||
D --> B | ||
C --> E[Increment Version Number and Update CHANGELOG.md] | ||
E --> F[Commit and Tag with Version Number] | ||
F --> G[New Tag Created] | ||
G --> H[Trigger Deployment Process] | ||
H --> I[Deployment Completed] | ||
I --> J[Send Notification] | ||
J --> K[End] | ||
``` |
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 |
---|---|---|
@@ -1,44 +1,24 @@ | ||
name: πSetup the project | ||
description: Perform standard setup and install dependencies using pnpm. | ||
description: Perform standard setup and install dependencies using deno. | ||
inputs: | ||
github_token: | ||
description: 'GitHub token' | ||
required: true | ||
deno_dir: | ||
description: 'The directory where deno dependencies are stored.' | ||
required: false | ||
default: 'my_cache_directory' # Set DENO_DIR to an absolute or relative path on the runner. | ||
runs: | ||
using: composite | ||
steps: | ||
- name: π οΈ Install node | ||
uses: actions/setup-node@v4 | ||
- name: π οΈ Install deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://npm.pkg.github.com' | ||
deno-version: v2.x | ||
|
||
- name: Configure .npmrc | ||
shell: bash | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ inputs.github_token }}" >> ~/.npmrc | ||
|
||
|
||
- name: ποΈ Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
package_json_file: 'package.json' | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Setup pnpm cache | ||
- name: Cache Deno dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
path: ${{ inputs.deno_dir }} | ||
key: ${{ hashFiles('deno.lock') }} | ||
|
||
- name: 𧩠Install dependencies | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.github_token }} | ||
run: pnpm install --recursive --frozen-lockfile --prod=false | ||
run: deno install |
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,25 @@ | ||
name: π Publish | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: π₯ Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: π¦ Setup Deno and install deps | ||
uses: ./.github/actions/setup | ||
|
||
- name: π¦ Publish package to JSR | ||
shell: bash | ||
working-directory: ./packages/schema-resume | ||
run: deno publish --dry-run |
This file was deleted.
Oops, something went wrong.
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
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
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