21 Commits

Author SHA1 Message Date
f2fb306124 fix(publish-npm): use github provider because the PROVENANCE require github self hosted runner 2025-10-04 07:47:01 +03:30
1fe34245e3 ci: disable package manager cache tmp 2025-09-27 08:46:40 +00:00
dependabot[bot]
9c20c5bc92 deps(deps): bump actions/setup-node from 4 to 5 in the github-actions group (#8)
deps(deps): bump actions/setup-node in the github-actions group

Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-27 10:07:07 +03:30
blacksmith-sh[bot]
61ada6397e .github/workflows: Migrate workflows to Blacksmith runners (#9)
Migrate workflows to Blacksmith

Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com>
2025-09-27 08:12:29 +03:30
Nexim Bot
bf6971e1af Revert "deps(deps): bump actions/setup-node from 4 to 5 in the github-actions group" (#7) 2025-09-08 13:29:09 +03:30
Nexim Bot
3bc559e467 Revert "deps(deps): bump actions/setup-node from 4 to 5 in the github-actions…"
This reverts commit 1660ce4e02.
2025-09-08 13:28:57 +03:30
dependabot[bot]
1660ce4e02 deps(deps): bump actions/setup-node from 4 to 5 in the github-actions group (#6)
deps(deps): bump actions/setup-node in the github-actions group

Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-06 12:08:17 +03:30
dependabot[bot]
0d2de95d88 deps(deps): bump actions/checkout from 4 to 5 in the github-actions group (#5)
deps(deps): bump actions/checkout in the github-actions group

Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 08:02:11 +03:30
9941d2fc6b feat(build-lint-test): add caching for .cache folders 2025-05-07 08:31:43 +03:30
b00b7468a1 fix: correctly set RELEASER_ACCOUNT_TOKEN 2025-01-04 09:00:32 +03:30
166fa43a55 refactor: enhancement and documenting 2025-01-04 08:48:18 +03:30
c032870efb feat: add sync label 2025-01-04 08:30:20 +03:30
26f62830d9 feat(dependency-review): add inputs for base_ref and head_ref in workflow 2025-01-04 08:18:38 +03:30
88958232f2 fix(publish-npm): add npm registry url input to workflow 2025-01-04 08:10:19 +03:30
5ddd93afcc fix(publish-npm): set registry url 2025-01-04 08:07:10 +03:30
abe20e7d8c fix: correct set node version 2025-01-02 13:57:47 +03:30
10517cadcd fix(publish-npm): remove eslint 2025-01-02 13:53:42 +03:30
d925019c58 chore: remove sync label 2025-01-02 13:53:23 +03:30
1f27e91c94 fix: change yml to yaml 2025-01-02 13:48:02 +03:30
219a04deec chore: add prettier 2025-01-02 13:23:39 +03:30
arashagp
09498b6079 fix: standardize input parameter naming in workflows (#4) 2025-01-02 13:07:59 +03:30
19 changed files with 313 additions and 61 deletions

15
.editorconfig Normal file
View File

@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 140
[*.md]
trim_trailing_whitespace = false

4
.gitattributes vendored Normal file
View File

@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated

View File

@@ -2,6 +2,10 @@
name: Build, Lint, and Test Project
# Required permission on the caller workflow
# permissions:
# contents: read
on:
workflow_call:
inputs:
@@ -11,22 +15,20 @@ on:
default: 'lts/*'
type: string
permissions:
contents: read
jobs:
main:
name: Build, Lint, and Test Project
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ inputs.NODE_VERSION }}
node-version: ${{ inputs.node-version }}
package-manager-cache: false
- name: 🛠️ Setup Node.js Corepack
run: corepack enable
@@ -43,6 +45,14 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: 🗂️ Cache .cache folders
uses: actions/cache@v4
with:
path: packages/**/.cache
key: ${{ runner.os }}-cache
restore-keys: |
${{ runner.os }}-cache-
- name: 📥 Install Dependencies
run: yarn install --immutable

View File

@@ -2,18 +2,19 @@
name: CodeQL
# Required permission on the caller workflow
# permissions:
# actions: read
# contents: read
# security-events: write
on:
workflow_call:
permissions:
actions: read
contents: read
security-events: write
jobs:
main:
name: CodeQL Analyze
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
strategy:
fail-fast: false
@@ -23,7 +24,7 @@ jobs:
steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@v3

View File

@@ -2,20 +2,35 @@
name: Dependency Review
# Required permission on the caller workflow
# permissions:
# contents: read
on:
workflow_call:
permissions:
contents: read
inputs:
base_ref:
description: 'The base ref for the dependency review'
required: false
type: string
default: 'next'
head_ref:
description: 'The head ref for the dependency review'
required: false
type: string
default: 'next'
jobs:
main:
name: Dependency Review
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🚀 Dependency Review
uses: actions/dependency-review-action@v4
with:
base-ref: ${{ inputs.base_ref }}
head-ref: ${{ inputs.head_ref }}

View File

@@ -2,6 +2,11 @@
name: Publish NPM
# Required permission on the caller workflow
# permissions:
# contents: read
# id-token: write
on:
workflow_call:
inputs:
@@ -10,18 +15,16 @@ on:
required: true
default: 'lts/*'
type: string
npm-registry-url:
description: 'NPM registry url'
required: false
default: 'https://registry.npmjs.org'
type: string
secrets:
NPM_TOKEN:
required: true
description: 'NPM token'
env:
NODE_VERSION: lts/*
permissions:
contents: read
id-token: write
jobs:
main:
if: github.repository_owner == 'the-nexim'
@@ -31,12 +34,14 @@ jobs:
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ inputs.NODE_VERSION }}
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.npm-registry-url }}
package-manager-cache: false
- name: 🛠️ Setup Node.js Corepack
run: corepack enable
@@ -60,15 +65,11 @@ jobs:
run: yarn build
env:
WIREIT_LOGGER: metrics
- name: 🧹 Run ESLint
run: yarn lint
env:
WIREIT_LOGGER: metrics
NODE_ENV: production
- name: 🚀 Publish
run: yarn run publish -- --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
WIREIT_LOGGER: metrics

View File

@@ -2,39 +2,40 @@
name: Build & Lint & Test & Release
# Required permission on the caller workflow
# permissions:
# contents: write
on:
workflow_call:
inputs:
NODE_VERSION:
node-version:
description: 'Node.js version'
required: true
default: 'lts/*'
type: string
secrets:
RELEASER_ACCOUNT_TOKEN:
required: true
description: 'GitHub token for the releaser account'
GPG_KEY_ID:
required: true
description: 'GPG key ID'
BOT_TOKEN:
required: true
description: 'Nexim Bot token'
GPG_PRIVATE_KEY:
required: true
description: 'GPG private key'
permissions:
contents: write
jobs:
main:
name: Build & Lint & Test & Release
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.BOT_TOKEN }}
token: ${{ secrets.RELEASER_ACCOUNT_TOKEN }}
- name: 🙂‍↔️ Import GPG key
run: |
@@ -54,9 +55,10 @@ jobs:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ inputs.NODE_VERSION }}
node-version: ${{ inputs.node-version }}
package-manager-cache: false
- name: 🛠️ Setup Node.js Corepack
run: corepack enable
@@ -94,5 +96,5 @@ jobs:
- name: 🤖 Get Release
run: yarn lerna version --yes
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASER_ACCOUNT_TOKEN }}
WIREIT_LOGGER: metrics

View File

@@ -1,26 +1,22 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Sync labels
# Required permission on the caller workflow
# permissions:
# contents: read
# issues: write
on:
workflow_call:
secrets:
GITHUB_TOKEN:
description: "GitHub token"
required: true
permissions:
contents: read
issues: write
jobs:
main:
name: Sync labels
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1

44
.gitignore vendored Normal file
View File

@@ -0,0 +1,44 @@
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore
# OSX
.DS_STORE
.DS_Store
._*
# Windows
Thumbs.db
Desktop.ini
# Logs
*.log*
# package managers
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
#!.yarn/cache
.pnp.*
node_modules
package-lock.json
# Build
dist
*.tsbuildinfo
*.map
*.d.ts
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
.tmp
.wireit
.eslintcache

17
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"recommendations": [
"cardinal90.multi-cursor-case-preserve",
"christian-kohler.path-intellisense",
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"github.copilot-chat",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"streetsidesoftware.code-spell-checker-persian",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one",
"gruntfuggly.todo-tree",
"arcanis.vscode-zipfs"
]
}

33
.vscode/settings.json vendored
View File

@@ -1,6 +1,35 @@
{
"prettier.singleQuote": true,
"cSpell.language": "en,fa,fa-IR",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.wordWrapColumn": 120,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"git.autoStash": true,
"git.branchProtection": ["next"],
"githubPullRequests.ignoredPullRequestBranches": ["next"],
"npm.packageManager": "yarn",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"prettier.useEditorConfig": true,
"search.exclude": {
"**/.pnp.*": true,
"**/.yarn": true,
"**/*.lock": true
},
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"cSpell.words": [
"nexim",
"wireit"
],
"todo-tree.tree.scanMode": "workspace only",
"github.copilot.chat.codeGeneration.instructions": [
{
"file": ".github/copilot-instruction.md"
}
]
}
}

5
.yarn/sdks/integrations.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!
integrations:
- vscode

30
.yarn/sdks/prettier/bin/prettier.cjs vendored Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env node
const { existsSync } = require(`fs`);
const { createRequire, register } = require(`module`);
const { resolve } = require(`path`);
const { pathToFileURL } = require(`url`);
const relPnpApiPath = '../../../../.pnp.cjs';
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
const absRequire = createRequire(absPnpApiPath);
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}
const wrapWithUserWrapper = existsSync(absUserWrapperPath) ? (exports) => absRequire(absUserWrapperPath)(exports) : (exports) => exports;
// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));

30
.yarn/sdks/prettier/index.cjs vendored Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env node
const { existsSync } = require(`fs`);
const { createRequire, register } = require(`module`);
const { resolve } = require(`path`);
const { pathToFileURL } = require(`url`);
const relPnpApiPath = '../../../.pnp.cjs';
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
const absRequire = createRequire(absPnpApiPath);
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}
const wrapWithUserWrapper = existsSync(absUserWrapperPath) ? (exports) => absRequire(absUserWrapperPath)(exports) : (exports) => exports;
// Defer to the real prettier your application uses
module.exports = wrapWithUserWrapper(absRequire(`prettier`));

7
.yarn/sdks/prettier/package.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"name": "prettier",
"version": "3.4.2-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
}

3
.yarnrc.yml Normal file
View File

@@ -0,0 +1,3 @@
enableTelemetry: false
preferInteractive: true

12
package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "@nexim/actions",
"packageManager": "yarn@4.6.0",
"type": "module",
"scripts": {
"format": "prettier . --write",
"upd": "yarn set version latest && yarn up '*' && yarn up '*' -R && yarn dlx @yarnpkg/sdks vscode && yarn dedupe"
},
"devDependencies": {
"prettier": "^3.4.2"
}
}

8
prettier.config.js Normal file
View File

@@ -0,0 +1,8 @@
/**
* @type {import('prettier').Options}
*/
const config = {
singleQuote: true,
};
export default config;

23
yarn.lock Normal file
View File

@@ -0,0 +1,23 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!
__metadata:
version: 8
cacheKey: 10c0
"@nexim/actions@workspace:.":
version: 0.0.0-use.local
resolution: "@nexim/actions@workspace:."
dependencies:
prettier: "npm:^3.4.2"
languageName: unknown
linkType: soft
"prettier@npm:^3.4.2":
version: 3.4.2
resolution: "prettier@npm:3.4.2"
bin:
prettier: bin/prettier.cjs
checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446
languageName: node
linkType: hard