> For the complete documentation index, see [llms.txt](https://candysharkstudio.gitbook.io/renrs-lua-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://candysharkstudio.gitbook.io/renrs-lua-tutorial/shi-yong-git-jin-xing-bian-yi-da-bao-fa-bu.md).

# 使用 Git 进行编译打包发布

那么，如何使用 Git 进行编译打包发布，这点对于某些资深程序员来说，一定是非常娴熟的操作了。。但是对于新手来说，可能并不是那么的友好（

因此，这里给各位做一个教程！

> 其实，在很久之前，我教会过一个人使用 Github Action 打包一个 RenPy 项目的 Android 打包。。
>
> 这都是过去式了，现在教各位的是使用 Github Action 编译一份 RenRs 项目！！

### 初始化

初始化，很简单，在各位的 main.lua 同级目录下，新建一个 .github 文件。随后再在里面新建一个 workflows 文件，很简单吧！

再然后，再 workflows 文件里面新建一个 build.yml 文件，此时各位的文件树应该长如下样子：

```
|- .github
    |- workflows
        |- build.yml
|- main.lua
```

好了！接下来，就是在我们的 `build.yml` 里面制作我们的启动程序了！

制作启动程序其实非常简单！我们只需要写入以下几行：

```yaml
name: Build <Your Project Name> Project
on:
  workflow_dispatch:
  push:
    branches: [main]
    
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://candysharkstudio.gitbook.io/renrs-lua-tutorial/shi-yong-git-jin-xing-bian-yi-da-bao-fa-bu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
