Github Actions All In One
Github Actions All In One
https://github.com/features/actions
https://github.com/marketplace?type=actions
https://docs.github.com/en/developers/github-marketplace
.github/workflows/main.yml
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
on & jobs
zh-Hans
# This is a basic workflow to help you get started with Actions
name: CI
# 控制 action 何时运行
# 在 push 或 pull 请求时触发工作流程事件,但仅针对 master 分支
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# 一个 workflow 运行由可以串行或并行运行的一个或多个 jobs 组成
jobs:
# 此工作流程仅包含一个名为 "build" 的 job
build:
# job 将运行的 runner 类型(执行的系统环境 Linux/ macOS / Windows)
runs-on: ubuntu-latest
# 步骤表示将作为 job 一部分执行的一系列 tasks
steps:
# 在 $GITHUB_WORKSPACE下检出你的repository,以便你的 job 可以访问它
- uses: actions/checkout@v2
# 使用 runners shell 运行单个命令
- name: Run a one-line script
run: echo 正在执行单个命令!
# 使用 runners shell 运行一组命令
- name: Run a multi-line script
run: |
echo 正在执行多个命令的 lint
echo 正在执行多个命令的 test
echo 正在执行多个命令的 build
echo 正在执行多个命令的 deploy
echo 正在执行多个命令的 npm publish
demos
.github/workflows/zh-Hans.yml
# This is a basic workflow to help you get started with Actions
name: 🚀 DevOps 👻
# 控制 action 何时运行
# 在 push 或 pull 请求时触发工作流程事件,但仅针对 master 分支
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# 一个 workflow 运行由可以串行或并行运行的一个或多个 jobs 组成
jobs:
# 此工作流程仅包含一个名为 "build" 的 job
build:
# job 将运行的 runner 类型(执行的系统环境 Linux/ macOS / Windows)
runs-on: ubuntu-latest
# 步骤表示将作为 job 一部分执行的一系列 tasks
steps:
# 在 $GITHUB_WORKSPACE下检出你的repository,以便你的 job 可以访问它
- uses: actions/checkout@v2
# 使用 runners shell 运行单个命令
- name: Run a one-line script ✅ 👨🏻💻
run: echo 正在执行单个命令!
# 使用 runners shell 运行一组命令
- name: Run a multi-line script ✅ 👨🏻💻
run: |
echo 正在执行多个命令的 lint
echo 正在执行多个命令的 test
echo 正在执行多个命令的 build
echo 正在执行多个命令的 deploy
echo 正在执行多个命令的 npm publish
echo finished 🎉
Ci/CD
DevOps
npm install
npm publish
dart package
publish package
testing
jest
how to publish a GitHub Action to the marketplace?
https://github.com/marketplace/actions/jest-reporter
https://github.com/tanmen/jest-reporter
refs
©xgqfrms 2012-2025
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13624584.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
2019-09-07 Flutter & QRCode App
2018-09-07 Shape Detection API
2016-09-07 库 !== 框架
2016-09-07 CSS clear float All In One