feat: enhance workflows by adding required secrets and expanding language support

This commit is contained in:
arashagp
2025-01-02 11:12:08 +03:30
parent 55d01ac20b
commit 1cc6cddc6f
4 changed files with 19 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: ["TypeScript"] language: ["TypeScript", "JavaScript"]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps: steps:

View File

@@ -10,6 +10,10 @@ on:
required: true required: true
default: "lts/*" default: "lts/*"
type: string type: string
secrets:
NPM_TOKEN:
required: true
description: "NPM token"
env: env:
NODE_VERSION: lts/* NODE_VERSION: lts/*
@@ -52,9 +56,6 @@ jobs:
- name: 📥 Install Dependencies - name: 📥 Install Dependencies
run: yarn install --immutable run: yarn install --immutable
- name: 🗃️ Cache Wireit
uses: google/wireit@setup-github-actions-caching/v2
- name: 🏗️ Build - name: 🏗️ Build
run: yarn build run: yarn build
env: env:

View File

@@ -5,15 +5,18 @@ name: Build & Lint & Test & Release
on: on:
workflow_call: workflow_call:
inputs: inputs:
node-version: NODE_VERSION:
description: "Node.js version" description: "Node.js version"
required: true required: true
default: "lts/*" default: "lts/*"
type: string type: string
secrets:
env: GPG_KEY_ID:
NODE_VERSION: lts/* required: true
GPG_KEY_ID: ${{ vars.GPG_KEY_ID }} description: "GPG key ID"
BOT_TOKEN:
required: true
description: "Nexim Bot token"
permissions: permissions:
contents: write contents: write
@@ -33,7 +36,7 @@ jobs:
- name: 🙂‍↔️ Import GPG key - name: 🙂‍↔️ Import GPG key
run: | run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
echo -e "5\ny\n" | gpg --batch --yes --command-fd 0 --edit-key ${{ env.GPG_KEY_ID }} trust quit echo -e "5\ny\n" | gpg --batch --yes --command-fd 0 --edit-key ${{ secrets.GPG_KEY_ID }} trust quit
env: env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -41,7 +44,7 @@ jobs:
run: | run: |
git config --global user.name "Nexim Bot" git config --global user.name "Nexim Bot"
git config --global user.email "bot@thenexim.com" git config --global user.email "bot@thenexim.com"
git config --global user.signingkey ${{ env.GPG_KEY_ID }} git config --global user.signingkey ${{ secrets.GPG_KEY_ID }}
git config --global commit.gpgsign true git config --global commit.gpgsign true
- name: 🔧 Setup Node.js - name: 🔧 Setup Node.js
@@ -67,9 +70,6 @@ jobs:
- name: 📥 Install Dependencies - name: 📥 Install Dependencies
run: yarn install --immutable run: yarn install --immutable
- name: 🗃️ Cache Wireit
uses: google/wireit@setup-github-actions-caching/v2
- name: 🏗️ Build - name: 🏗️ Build
run: yarn build run: yarn build
env: env:

View File

@@ -4,6 +4,10 @@ name: Sync labels
on: on:
workflow_call: workflow_call:
secrets:
GITHUB_TOKEN:
description: "GitHub token"
required: true
permissions: permissions:
contents: read contents: read