Copy instead of reference #115
Workflow file for this run
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: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| - 'v[0-9]+.[0-9]+.[0-9]+-dev[0-9]+' | |
| - 'v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+' | |
| - 'v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+' | |
| - 'v[0-9]+.[0-9]+.[0-9]+-prerelease[0-9]+' | |
| 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:flutter3.35.3-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: Get tag version | |
| run: | | |
| echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - 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:flutter3.35.3-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 |