创建工作流
第一次接触github的工作流,在创建项目后,点击Actions选项卡,进入Action
页面。

echo Hello, world!
echo Add other actions to build,
echo test,and deploy your project.
当然这只是github给出的使用案例,可以选择它所提供的其他workflow
配置,其中包含node,rust,paython,java,swift,laravel,maven..等等,找到自己开发使用的语言跟构建工具。点击Set up this workflow.

本地代码提交
本地使用git与github关联上,先pull拉取最新代码,然后push本地暂存区代码。上传完代码后,去自己的github项目中点击Action进行查看。

遇到的问题
如果本地代码是使用window进行开发,github进行工作流构建是使用的Ubuntu进行的。这时调用./gradlew build。将会报错。

错误信息提示gradlew没有权限。
##### 解决:
```
git update-index --chmod=+x gradlew
git add .
git commit -m "Changing permission of gradlew"
git push
```

最终的运行效果

网友评论