美文网首页
记录github使用workflow

记录github使用workflow

作者: 王怀智 | 来源:发表于2020-04-20 12:08 被阅读0次

    创建工作流

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


    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进行查看。


    image.png

    遇到的问题

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


    gradlew无权限.jpg

    错误信息提示gradlew没有权限。

     ##### 解决:
    ```
    git update-index --chmod=+x gradlew
    git add .
    git commit -m "Changing permission of gradlew"
    git push
    ```
    
    修改gradlew的权限.jpg

    最终的运行效果

    image.png

    相关文章

      网友评论

          本文标题:记录github使用workflow

          本文链接:https://www.haomeiwen.com/subject/morrihtx.html