chore: use org id in shorebird init #53
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: ci | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} | |
| BUILD_NUMBER: 1 | |
| BUILD_NAME: 0.1.0 | |
| jobs: | |
| semantic-pull-request: | |
| uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 | |
| e2e: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: π Git Checkout | |
| uses: actions/checkout@v4 | |
| - name: π― Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: β Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: π¦ Setup Shorebird | |
| uses: shorebirdtech/setup-shorebird@v1 | |
| - name: β¨ Create New Flutter Project | |
| run: flutter create e2e_test --empty | |
| - name: π¦ Shorebird Init | |
| run: shorebird init --force --organization-id=14235 | |
| working-directory: e2e_test | |
| - name: π¦ Shorebird Release | |
| uses: shorebirdtech/shorebird-release@v1 | |
| id: shorebird-release | |
| with: | |
| args: --verbose -- --build-name=${{ env.BUILD_NAME }} --build-number=${{ env.BUILD_NUMBER }} | |
| flutter-version: latest | |
| platform: android | |
| working-directory: e2e_test | |
| - name: π¦ Shorebird Patch (MacOS/Linux) | |
| if: runner.os != 'Windows' | |
| uses: ./ | |
| id: shorebird-patch-unix | |
| with: | |
| args: --verbose | |
| platform: android | |
| release-version: "${{ env.BUILD_NAME }}+${{ env.BUILD_NUMBER }}" | |
| working-directory: e2e_test | |
| - name: π¦ Shorebird Patch (Windows) | |
| if: runner.os == 'Windows' | |
| uses: ./ | |
| id: shorebird-patch-windows | |
| with: | |
| # We only need allow-asset-diffs on Windows because the release was generated on a | |
| # macOS machine, so ignoring asset diffs for now. | |
| args: --verbose --allow-asset-diffs | |
| platform: android | |
| release-version: "${{ env.BUILD_NAME }}+${{ env.BUILD_NUMBER }}" | |
| working-directory: e2e_test | |
| - name: π¦ Assert Patch Number (MacOS/Linux) | |
| if: runner.os != 'Windows' | |
| run: | | |
| if [[ ${{ steps.shorebird-patch-unix.outputs.patch-number }} =~ ^-?[0-9]+$ ]]; then | |
| echo 'β Shorebird Patch Succeeded!' | |
| else | |
| echo 'β Shorebird Patch Failed.' | |
| exit 1 | |
| fi | |
| - name: π¦ Assert Patch Version (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| if ("${{ steps.shorebird-patch-windows.outputs.patch-number }}" -match "^[0-9]+$") { | |
| Write-Output "β Shorebird Patch Succeeded!" | |
| } else { | |
| Write-Output "β Shorebird Patch Failed." | |
| exit 1 | |
| } |