-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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