7.3.6 (#98) #94
This file contains hidden or 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: | |
| 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 |