-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (59 loc) · 1.71 KB
/
publish.yml
File metadata and controls
73 lines (59 loc) · 1.71 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Publish to pub.dev
on:
push:
branches: [ "main" ]
permissions:
contents: read
pages: write
id-token: write
repository-projects: read
packages: read
jobs:
publish:
runs-on: ubuntu-latest
container:
image: ghcr.io/goldenm-software/flutter-web-builder:x86-flutter3.32.0-uv-python3.13
options: --user root
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
PUB_JSON: ${{ secrets.LAYRZ_PUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate
run: |
python3 authenticate.py
- name: Publish
run: |
flutter pub publish --force
- name: Cleanup
run: |
dart pub token remove https://pub.dev
buils-site:
runs-on: ubuntu-latest
container:
image: ghcr.io/goldenm-software/flutter-web-builder:x86-flutter3.32.0-uv-python3.13
options: --user root
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
id: setup_pages
uses: actions/configure-pages@v4.0.0
- name: Build
run: |
cd example
flutter build web --release --base-href=${{ steps.setup_pages.outputs.base_path }}/ --no-tree-shake-icons --wasm
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.0
with:
# Upload entire repository
path: './example/build/web'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.3