Skip to content

Merge pull request #178 from muj-i/main #20

Merge pull request #178 from muj-i/main

Merge pull request #178 from muj-i/main #20

Workflow file for this run

name: Publish to Pub.dev 🚀
on:
push:
tags:
- '*'
jobs:
publishing:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Check Versions 🔎
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
export VRSN=$(grep 'String version = ' lib/models/agora_rtm_mute_request.dart | sed -e 's,.*\"\(.*\)\";,\1,')
export PUBSPEC_VERSION=$(grep 'version: ' pubspec.yaml | sed -e 's,.*: \(.*\),\1,')
if [ "$LIB_VERSION" != "$VRSN" ]; then
echo "Version in 'lib/models/agora_rtm_mute_request.dart' does not match tag.";
exit 1;
fi
if [ "$LIB_VERSION" != "$PUBSPEC_VERSION" ]; then
echo "Version in 'pubspec.yaml' does not match tag.";
exit 1;
fi
- name: Publish Dart Package 🚢
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}