تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
عملية نشر مشروع "برمجة التطبيقات" هي إصدار من البرنامج النصي يتم إتاحته للاستخدام كتطبيق ويب أو إضافة أو ملف تنفيذي لواجهة برمجة التطبيقات. من خلال إنشاء عمليات نشر وإدارتها، يمكنك تكرار الرمز البرمجي وتتبُّع التغييرات والتحكّم في إصدار الرمز البرمجي الذي يمكن للمستخدمين الوصول إليه.
هناك نوعان من عمليات النشر:
عمليات النشر الرئيسية، التي تتم مزامنتها دائمًا مع رمز المشروع الحالي
عمليات النشر المستندة إلى إصدار، والتي تكون مرتبطة بإصدار مشروع محدّد
عمليات النشر الرئيسية
يشير النشر الرئيسي إلى رمز المشروع الحالي. عند إنشاء مشروع Apps Script، يتم تلقائيًا إنشاء عملية نشر رئيسية لهذا المشروع.
يكون النشر الرئيسي متزامنًا دائمًا مع آخر رمز تم حفظه. على سبيل المثال، إذا أنشأت عملية نشر ذات إصدار ثم عدّلت الرمز، ستعرض عملية النشر الرئيسية هذه التغييرات، بينما تظل عملية النشر ذات الإصدار كما هي.
استخدِم عمليات نشر الإصدارات التجريبية من القناة الرئيسية لاختبار الرمز. لا تستخدم عمليات نشر على مستوى الرأس للاستخدام العام.
عمليات النشر المحدّدة بإصدار
تتيح عملية النشر التي تتضمّن إصدارًا معيّنًا استخدام إصدار محدّد من رمز المشروع. ويتيح ذلك للمستخدمين مواصلة استخدام نسخة تعمل بشكل جيد أثناء إجراء التغييرات والتحسينات على الرمز.
عند نشر تطبيقك ليستخدمه الجميع، استخدِم دائمًا عملية نشر تتضمّن إصدارًا. يمكنك إجراء عمليات نشر متعددة نشطة ومحدّدة الإصدار في الوقت نفسه.
ملاحظة مهمة: لا يمكنك نقل ملكية عمليات النشر التي تتضمّن إصدارات. في حال نقل ملكية مشروع نص برمجي إلى مستخدم آخر، لن يتغير مالك عمليات النشر الحالية التي تم إصدارها ضمن المشروع. إذا حذف المشرف حساب مالك عملية النشر، قد تواجه أخطاء في النصوص البرمجية لعمليات النشر.
لإنشاء عملية نشر مستندة إلى إصدار، اتّبِع الخطوات التالية:
افتح مشروع Apps Script.
في أعلى يسار الصفحة، انقر على نشر>عملية نشر جديدة.
بجانب اختيار النوع، انقر على "تفعيل أنواع النشر"settings.
اختَر نوع النشر الذي تريد تنفيذه. بالنسبة إلى إضافات Google Workspace وإضافات المحرّر وتطبيقات Google Chat، اختَر إضافة.
أدخِل معلومات حول عملية النشر وانقر على نشر.
عرض عمليات النشر التي تتضمّن إصدارات
لعرض عمليات نشر مشروع في "برمجة تطبيقات Google"، انقر في أعلى الصفحة على نشر>إدارة عمليات النشر.
للاطّلاع على رمز إصدار معيّن، يُرجى الرجوع إلى عرض إصدار سابق.
تعديل عملية نشر ذات إصدار
يمكنك تعديل عملية نشر ذات إصدار لتغيير وصفها أو إصدارها. لتعديل عملية نشر، اتّبِع الخطوات التالية:
افتح مشروع Apps Script.
انقر على نشر>إدارة عمليات النشر.
اختَر عملية النشر النشطة التي تريد تغييرها، ثم انقر على "تعديل" edit.
أدخِل التغييرات وانقر على نشر.
إذا أردت تعديل عملية نشر مؤرشفة، عليك إعادة نشرها، ثم اتّباع الخطوات السابقة.
عندما تريد نشر تغيير في رمز المشروع، أنشئ إصدارًا جديدًا وعدِّل عملية النشر لاستخدامه. يتم استخدام الإصدار الجديد تلقائيًا من قِبل أي مستخدمين يستخدمون عملية النشر هذه.
العثور على رقم تعريف عملية نشر
يحتوي كل عملية نشر على معرّف سلسلة مرتبط يتم إنشاؤه تلقائيًا. للعثور على رقم التعريف هذا، اتّبِع الخطوات التالية:
افتح مشروع Apps Script.
في أعلى يسار الصفحة، انقر على نشر>إدارة عمليات النشر.
اختَر عملية نشر نشطة للعثور على رقم تعريفها.
لا تظهر أرقام تعريف عمليات النشر إلا في عمليات النشر النشطة.
اختبار عملية نشر
تعتمد طريقة اختبار عملية النشر على نوع التطبيق الذي تنشئه.
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eApps Script deployments make your script usable as a web app, add-on, or API executable, allowing for controlled code iteration and user access.\u003c/p\u003e\n"],["\u003cp\u003eHead deployments automatically reflect the latest code changes and are best suited for testing purposes, while versioned deployments offer stability for public use by linking to specific project versions.\u003c/p\u003e\n"],["\u003cp\u003eVersioned deployments, crucial for public applications, require switching to a standard Google Cloud Project and can be managed through the deployment settings within the Apps Script project.\u003c/p\u003e\n"],["\u003cp\u003eYou can view, edit, and archive versioned deployments, but deletion is not possible; archived deployments can be redeployed if needed.\u003c/p\u003e\n"],["\u003cp\u003eDeployment IDs are essential for testing certain deployment types like Chat apps and API executables, and they can be accessed from the Manage deployments section.\u003c/p\u003e\n"]]],[],null,["An Apps Script project deployment is a version of the script that is made\navailable for use as a web app, add-on, or API executable. By creating and\nmanaging deployments, you can iterate on your code, keep track of your changes,\nand control the exact code version your users have access to.\n\nThere are two types of deployments:\n\n- *Head deployments*, which are always synced to the current project code.\n- *Versioned deployments*, which are connected to a specific project version.\n\nHead deployments\n\nA head deployment is the current project code. When you create an Apps Script\nproject, you automatically create a head deployment for that project.\n\nThe head deployment is always in sync with most recently saved code. For\nexample, if you create a versioned deployment and then modify your code, the\nhead deployment reflects those changes, while the versioned deployment remains\nintact.\n\nUse head deployments to test code. Don't use head deployments for public use.\n| **Note:** There is only ever one head deployment for each Apps Script project. To use a head deployment, you must have at least read access to the script project.\n\nVersioned deployments\n\nA versioned deployment makes a specific version of the project code available.\nThis lets your users continue to use a functioning version while you make\nchanges and improvements to the code.\n\nWhen your application is published for public consumption, always use a\nversioned deployment. You can have multiple active versioned deployments at\none time.\n\n**Important**: You can't transfer ownership of versioned deployments. If you\ntransfer ownership of a script project to someone, the owner of the existing\nversioned deployments within the project doesn't change. If an administrator\ndeletes the deployment owner's account, you might experience script errors for\ntheir deployments.\n\nCreate a versioned deployment\n\nTo deploy a version of a Google Workspace add-on,\nEditor add-on, Google Chat app, or an API\nexecutable, you must first [switch your Apps Script's\nGoogle Cloud project association from the default project to a standard\nproject](/apps-script/guides/cloud-platform-projects#switching_to_a_different_standard_gcp_project).\n\nTo create a versioned deployment, follow these steps:\n\n1. Open the Apps Script project.\n2. At the top right, click **Deploy** \\\u003e **New deployment**.\n3. Next to **Select type** click Enable deployment types settings.\n4. Select the deployment type that you want to deploy. For Google Workspace add-ons, Editor add-ons, and Google Chat apps, select **Add-on**.\n5. Enter the information about your deployment and click **Deploy**.\n\n | **Note:** Each new deployment can be shared as a library. If you share the script as a library, the deployment description is visible to users of the library.\n\nView versioned deployments\n\nTo view the deployments of an Apps Script project, at the top,\nclick **Deploy** \\\u003e **Manage deployments**.\n\nTo view the code of a specific version, refer to [View a previous\nversion](/apps-script/guides/versions#view-script).\n\nEdit a versioned deployment\n\nYou can edit a versioned deployment to change its description or version. To\nedit a deployment, follow these steps:\n\n1. Open the Apps Script project.\n2. Click **Deploy** \\\u003e **Manage deployments**.\n3. Select the active deployment you want to change and click Edit edit.\n4. Make your changes and click **Deploy**.\n\n If you want to edit an archived deployment, you must redeploy it, then\n follow the preceding steps.\n\n When you want to deploy a change to the project code, create a new version and\n edit the deployment to use it. The new version is automatically used by any\n users that use that deployment.\n\nFind a deployment ID\n\nEvery deployment has an associated string ID automatically created for it. To\nfind this ID, follow the steps below:\n\n1. Open the Apps Script project.\n2. At the top right, click **Deploy** \\\u003e **Manage deployments**.\n3. Select an active deployment to find its ID.\n\n Deployment IDs only appear on active deployments.\n\nTest a deployment\n\nHow you test a deployment depends on the type of app you build. \n**Google Workspace add-on**\n\n\nTo test a Google Workspace add-on deployment, see\n[Testing Google Workspace add-ons](/workspace/add-ons/how-tos/testing-workspace-addons).\n**Editor add-on**\n\n\nTo test an Editor add-on deployment, see [Test an Editor add-on](/workspace/add-ons/how-tos/testing-editor-addons).\n**Web app**\n\n\nTo test a web app deployment, see [Test a web app deployment](/apps-script/guides/web#test_a_web_app_deployment).\n**Google Chat app**\n\n\nTo test a Chat app deployment, you must first [create a versioned deployment](/apps-script/concepts/deployments#versioned-deployments) of the script to access its deployment ID.\n\nAfter you have the deployment ID, specify the ID in the [Chat API configuration](/workspace/chat/receive-respond-interactions#configure)\nand follow the steps to\n[test interactive\nfeatures](/workspace/chat/test-interactive-features).\n**API Executable**\n\n\nTo test an API executable deployment, you must first [create a versioned deployment](#create-versioned). After you create a deployment, follow the\nsteps below:\n\n1. At the top right of the Apps Script project, click **Deploy \\\u003e Test\n Deployments**.\n2. Next to \"Select type,\" click Enable deployment types **\\\u003e API Executable**.\n3. Copy and use the URL to test your API Executable deployment.\n\nArchive a versioned deployment\n\nYou can't delete versioned deployments. Instead, you can archive them.\n\nTo archive a versioned deployment:\n\n1. Open the Apps Script project.\n2. Click **Deploy** \\\u003e **Manage deployments**.\n3. Select the deployment you want to archive and click Archive deployment archive.\n\nRedeploy an archived deployment\n\n1. Open the Apps Script project.\n2. At the top right, click **Deploy** \\\u003e **Manage deployments**.\n3. At the left under **Archived** , select the deployment you want to redeploy and click Edit edit \\\u003e **Deploy**."]]