how to publish a dart package using Github Actions?

dart package

flutter package

Github Actions

publish bug

# get credentials.json
$ flutter pub uploader add xgqfrms@gmail.com

$ killall -9 dart

domain bug

Waiting for your authorization...
Authorization received, processing...
It looks like accounts.google.com is having some trouble.
Pub will wait for a while before trying to connect again.

https://github.com/xgqfrms/dart-library-package/issues/4

https://github.com/xgqfrms/dart-library-package/wiki

.github/workflows/dart.yml


name: Dart CI on:
push:
branches: [ master ]
pull_request:
branches: [ master ] jobs:
build: runs-on: ubuntu-latest container:
image: google/dart:latest steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: pub get
- name: Run tests
run: pub run test

$VAR

jobs:
build:
runs-on: ubuntu-latest steps:
- uses: actions/checkout@v1
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '1.9.1+hotfix.6'
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Run tests
run: flutter test
- name: Setup Pub Credentials
shell: bash
env:
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
run: |
sh ./pub_login.sh
- name: Check Publish Warnings
run: pub publish --dry-run
- name: Publish Package
run: pub publish -f

refs

https://pub.dev/

publish dart package / publish flutter package

https://birjuvachhani.dev/posts/publish-your-flutter-package-using-github-actions/

https://medium.com/evenbit/publishing-dart-packages-with-github-actions-5240068a2f7d

https://github.com/marketplace/actions/publish-dart-flutter-package

https://github.com/marketplace/actions/dart-and-flutter-package-publisher

GitHub Actions

https://www.cnblogs.com/xgqfrms/p/13624584.html

GitHub Actions & documents tutorials

configuring-and-managing-workflows

https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-and-managing-workflow-files-and-runs

https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#manually-running-a-workflow

reference

https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy

https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners

https://docs.github.com/en/actions/reference/events-that-trigger-workflows

https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


how to publish a dart package using Github Actions?的更多相关文章

  1. How to Publish a NuGet Package

    How to Publish a NuGet Package Command line To push packages to nuget.org you must use nuget.exe v4. ...

  2. How to using PyPI publish a Python package

    How to using PyPI publish a Python package PyPI & Python package https://pypi.org/ main make a f ...

  3. GitHub Actions & GitHub Secrets

    GitHub Actions & GitHub Secrets tokens & private variable GitHub Secrets https://github.com/ ...

  4. GitHub Actions in Action

    GitHub Actions in Action https://lab.github.com/githubtraining/github-actions:-hello-world https://g ...

  5. 5 分钟教你快速掌握 GitHub Actions 自动部署博客

    自从 GitHub 宣布 GitHub Actions 在平台上对所有开发人员和存储库可用以来,GitHub Actions 越来越受欢迎.很多第三方平台在生态系统中有速度等限制,将进一步推动开发人员 ...

  6. 基于 Github Actions 自动部署 Hexo 博客

    前言 前不久使用了 Hexo 搭建独立博客,我是部署在我的腾讯云轻量应用服务器上的,每次都需要 hexo deploy 然后打包.上传.解压和刷新 CDN,非常麻烦.我的服务器配置也不高 2C2G 无 ...

  7. 使用Linux、Nginx和Github Actions托管部署ASP.NET Core 6.0应用

    使用Linux.Nginx和Github Actions托管部署ASP.NET Core 6.0应用 前言 本文主要参考微软这篇文档而来 Host ASP.NET Core on Linux with ...

  8. 使用 GitHub Actions 实现 Hexo 博客自动部署

    一.Hexo 相关知识点 静态博客简单,但是发布博文时稍显麻烦,一般需要下面两步: hexo clean hexo g -d // 相当于 hexo g + hexo d 如果考虑到同步源文件,还需要 ...

  9. vuepress-theme-reco + Github Actions 构建静态博客,部署到第三方服务器

    最新博客链接 Github链接 查看此文档前应先了解,vuepress基本操作 参考官方文档进行配置: vuepress-theme-reco VuePress SamKirkland / FTP-D ...

随机推荐

  1. 一站式入口服务|爱奇艺微服务平台 API 网关实战 原创 弹性计算团队 爱奇艺技术产品团队

    一站式入口服务|爱奇艺微服务平台 API 网关实战 原创 弹性计算团队 爱奇艺技术产品团队

  2. rehash (重新散列)

    rehash - Redis 设计与实现 http://redisbook.com/preview/dict/rehashing.html

  3. .NET并发编程-函数式编程

    本系列学习在.NET中的并发并行编程模式,实战技巧 函数式编程 和面向过程编程POP(procedure oriented Programming)面向对象编程OOP(object oriented ...

  4. (万字好文)Dubbo服务熔断与降级的深入讲解&代码实战

    原文链接:(万字好文)Dubbo服务熔断与降级的深入讲解&代码实战 一.Dubbo服务降级实战 1 mock 机制 谈到服务降级,Dubbo 本身就提供了服务降级的机制:而 Dubbo 的服务 ...

  5. MySql(三)存储过程和函数

    MySql(三)存储过程和函数 一.什么是存储过程和函数 二.存储过程和函数的相关操作 一.什么是存储过程和函数 存储过程和函数是事先经过编译并存储在数据库中的一段SQL语句的集合,调用存储过程和函数 ...

  6. Windows操作Redis及Redis命令

    Windows操作Redis及Redis命令 一.Windows下操作Redis 设置密码 打开redis服务 Windows 下的redis命令行 二.redis常用命令大全 key String ...

  7. Ajax原理,技术封装与完整示例代码

    在做项目和学习的时候,经常用到Ajax的相关技术,但是这方面的技术总是运用的不是十分好,就寻找相关博客来学习加深Ajax技术相关. 一.Ajax简介 二.同步.异步传输区别 2.1 异步传输 2.2 ...

  8. JavaScript学习(一)——引擎,运行时,调用堆栈

    JavaScript引擎 谷歌 V8 引擎是流行的 JavaScript 引擎之一.V8 引擎在诸如 Chrome 和 Node.js 内部使用. 引擎包括两个主要组件: 动态内存管理 – 在这里分配 ...

  9. Pytest(14)pytest.ini配置文件

    前言 pytest配置文件可以改变pytest的运行方式,它是一个固定的文件pytest.ini文件,读取配置信息,按指定的方式去运行 查看pytest.ini的配置选项 pytest -h 找到以下 ...

  10. EF6.2加载速度慢的解决方案

    最近的项目中一直有反馈,EF在第一次启动之后调用的话,加载速度很慢,在网上搜索了一下,基本就是三种解决方案. 在程序启动的时候将映射视图缓存下来. 使用Ngen生成EF的本地镜像. IIS8内置功能 ...