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. 配置完xadmin源码包后启动报错“ Apps aren't loaded yet.”

    raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions. 碰到这种情况就要查看下是否 ...

  2. Linux centos7编译源码安装redis

    1.安装准备 ① 由于redis底层用c语言编写的,安装redis需要先将官网下载的源码进行编译,编译依赖make和gcc环境,如果没有则需要安装(一般系统中已经装了了make和gcc,无须再装) 安 ...

  3. Java Web学习之路

    编程基础 1-1 常用数据结构 数组.链表.堆.栈.队列.Hash表.二叉树等1-2 算法思想 算法时间复杂度和空间复杂度的分析计算 1-2 算法思想:递推.递归.穷举.贪心.分治.动态规划.迭代.分 ...

  4. Docker安装mysql5.7并且配置主从复制

    Docker安装mysql5.7并且配置主从复制 一.拉取mysql镜像 二.创建文件docker.cnf 2.1 mysql主机(192.168.21.55:3307) 2.1.1 创建文件夹 2. ...

  5. DNS欺骗&嗅探监听

    承接上一章,除了arp欺骗之外对的欺骗方法 a)使用kali,对dns文件进行编辑 使用的欺骗工具是ettercap.对dns文件编辑: 添加一个A记录,解释到kali自身: b)进行欺骗 通过命令行 ...

  6. StringTable---字符串常量池的垃圾回收跟踪案例

    引言 很多人认为jvm字符串常量不会被回收的,其实这个说法的有误区的,我们通过一些jvm参数可以看到StringTable的垃圾回收. 案例说明 参数说明 参数 说明 -Xmx10m 堆空间大小 -X ...

  7. jQuery插件Validate

    一.导入js库 <script type="text/javascript" src="<%=path %>/validate/jquery-1.6.2 ...

  8. Educational Codeforces Round 88 (Rated for Div. 2) D、Yet Another Yet Another Task

    题意: 给你一个含n个数a1,a2...an的数组,你要找到一个区间[l,r],使得al+a(l+1)+...+a(r-1)+ar减去max(al,a(l+1),...,a(r-1),ar)的值尽可能 ...

  9. 用servlet在网页中打印字符串(初接触)、servlet调用过程

    一.servlet是什么: 二.在官方文档中点servlet 这就是servlet的方法,这里说一下什么叫生命周期的方法(life-cycle methods):就是这个对象一旦创生之后一定会执行的方 ...

  10. Codeforces Round #479 (Div. 3) E. Cyclic Components (思维,DFS)

    题意:给你\(n\)个顶点和\(m\)条边,问它们有多少个单环(无杂环),例如图中第二个就是一个杂环. 题解:不难发现,如果某几个点能够构成单环,那么每个点一定只能连两条边.所以我们先构建邻接表,然后 ...