Skip to content

main_workflow_completed #7

main_workflow_completed

main_workflow_completed #7

Workflow file for this run

name: Publish to pub.dev
on:
repository_dispatch:
types: [main_workflow_completed]
workflow_dispatch:
# push:
# branches:
# - main
concurrency:
group: "publish"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: Git config
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: dev
- name: Install dependencies
run: dart pub get
- name: Prepare pub credentials
run: |
mkdir -p $XDG_CONFIG_HOME/dart
echo '${{ secrets.PUB_DEV_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
env:
XDG_CONFIG_HOME: /home/runner/.config
- name: Publish to pub.dev
# env:
# PUB_DEV_CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
run: echo $PUB_DEV_CREDENTIALS | dart pub publish --force