fix: change yml to yaml

This commit is contained in:
2025-01-02 13:48:02 +03:30
parent 219a04deec
commit 1f27e91c94
2 changed files with 0 additions and 0 deletions

74
.github/workflows/publish-npm.yaml vendored Normal file
View File

@@ -0,0 +1,74 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish NPM
on:
workflow_call:
inputs:
node-version:
description: 'Node.js version'
required: true
default: 'lts/*'
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'
name: Publish NPM
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.NODE_VERSION }}
- name: 🛠️ Setup Node.js Corepack
run: corepack enable
- name: 📦 Get Yarn Config
id: yarn_config
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: 🗄️ Cache Layer
uses: actions/cache@v4
with:
path: ${{ steps.yarn_config.outputs.cache_folder }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 📥 Install Dependencies
run: yarn install --immutable
- name: 🏗️ Build
run: yarn build
env:
WIREIT_LOGGER: metrics
- name: 🧹 Run ESLint
run: yarn lint
env:
WIREIT_LOGGER: metrics
- name: 🚀 Publish
run: yarn run publish -- --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
WIREIT_LOGGER: metrics