1- name : Release to Pub .dev
1+ name : Publish to pub .dev
22
33on :
44 push :
55 tags :
6- - ' v[0-9]+.[0-9]+.[0-9]+*'
6+ - " v[0-9]+.[0-9]+.[0-9]+*"
77
88jobs :
99 publish :
10- name : Publish to Pub.dev
11- runs-on : ubuntu-latest
10+ if : github.repository_owner == 'viamrobotics'
11+ runs-on : buildjet-2vcpu-ubuntu-2204
12+ permissions :
13+ id-token : write # Required for authentication using OIDC
1214 steps :
13- - name : Checkout Code
14- uses : actions/checkout@v4
15-
16- - name : Setup Flutter
17- uses : subosito/flutter-action@v2
18- with :
19- channel : ' stable'
20-
21- - name : Install Dependencies
15+ - uses : actions/checkout@v4
16+ - uses : subosito/flutter-action@v2
17+ - uses : dart-lang/setup-dart@v1
18+ - name : Install dependencies
2219 run : flutter pub get
23-
24- # 👇 FIXED: We use a local folder and force ENV variables
25- - name : Create Credentials File
26- run : |
27- # Create a local folder in the workspace
28- mkdir -p $GITHUB_WORKSPACE/pub_cache
29-
30- # Write the secret to credentials.json in that folder
31- cat <<EOF > $GITHUB_WORKSPACE/pub_cache/credentials.json
32- ${{ secrets.PUB_CREDENTIALS }}
33- EOF
34-
35- - name : Publish Package
36- # 👇 We explicitly tell Flutter to use our local folder as the cache
37- env :
38- PUB_CACHE : ${{ github.workspace }}/pub_cache
39- run : flutter pub publish --force
20+ - name : Publish
21+ run : dart pub publish --force
0 commit comments