first commit #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to pub.dev | |
on: | |
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 |