├── .github ├── dependabot.yml └── workflows │ └── main.yaml ├── RELEASE.md ├── LICENSE ├── action.yml └── README.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | groups: 13 | gha-deps: 14 | patterns: 15 | - "*" 16 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Releasing Setup Shorebird 2 | 3 | These are the steps needed to create a new release: 4 | 5 | 1. Create a new release in GitHub 6 | - Click on `Releases -> Draft a new release` 7 | 1. Make sure to name the release `v` (e.g. v1.2.3) 8 | 1. Click on `Generate release notes` 9 | 1. Click on `Publish release` 10 | 1. Update the current major version tag to point to the latest release. For example, if we just released v0.1.2, we'll need to make sure the `v0` tag points to the same commit as `v0.1.2` 11 | ```sh 12 | # force update the latest release tag 13 | git tag -f v0 v0.1.2 14 | # push the tag 15 | git push origin :refs/tags/v0 16 | ``` 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Shorebird 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: Shorebird Release 2 | description: Create a new release using the Shorebird CLI 3 | 4 | branding: 5 | icon: package 6 | color: green 7 | 8 | inputs: 9 | args: 10 | description: The arguments to pass to the Shorebird release command 11 | required: false 12 | default: "" 13 | flutter-version: 14 | description: The version of Flutter to use for the release. Use "latest" to always target the latest stable version. 15 | required: true 16 | platform: 17 | description: The platform for which to create a release (e.g. android, ios) 18 | required: true 19 | working-directory: 20 | description: The working directory in which to run Shorebird 21 | required: false 22 | default: . 23 | 24 | outputs: 25 | release-version: 26 | description: The version of the release that was created. 27 | value: ${{ steps.shorebird-release.outputs.release-version }} 28 | 29 | runs: 30 | using: composite 31 | steps: 32 | - name: 🐦 Shorebird Release 33 | shell: bash 34 | id: shorebird-release 35 | working-directory: ${{ inputs.working-directory }} 36 | run: | 37 | shorebird release ${{ inputs.platform }} --flutter-version ${{ inputs.flutter-version }} ${{ inputs.args }} | tee output.log 38 | GREP_MATCH=$(grep -Ei "Published Release (.*)" output.log) 39 | if [[ $GREP_MATCH ]]; then 40 | # Strip the non-version-number characters from the line 41 | RELEASE_VERSION=$(echo $GREP_MATCH | sed -E 's/^.+ Published Release (.*)\!$/\1/') 42 | echo "release-version=$(echo $RELEASE_VERSION)" >> $GITHUB_OUTPUT 43 | else 44 | echo "Failed to create release" 45 | exit 1 46 | fi 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shorebird Release 2 | 3 | [![ci](https://github.com/shorebirdtech/shorebird-release/actions/workflows/main.yaml/badge.svg)](https://github.com/shorebirdtech/shorebird-release/actions/workflows/main.yaml) 4 | [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) 5 | 6 | Create a new release using the [Shorebird CLI](https://github.com/shorebirdtech/shorebird) for use in GitHub Actions. 7 | 8 | ## Features 9 | 10 | ✅ Create new releases for iOS, Android, macOS, Linux, and Windows 11 | 12 | ✅ Outputs the release version 13 | 14 | ## Usage 15 | 16 | Standard usage: 17 | 18 | ```yaml 19 | steps: 20 | - uses: shorebirdtech/setup-shorebird@v1 21 | - uses: shorebirdtech/shorebird-release@v1 22 | id: shorebird-release 23 | with: 24 | flutter-version: latest 25 | platform: android 26 | working-directory: ./path/to/app 27 | 28 | - run: echo release-version ${{ steps.shorebird-release.outputs.release-version }} 29 | shell: bash 30 | ``` 31 | 32 | If you need to provide arguments to the release command, you can do so like this: 33 | 34 | ```yaml 35 | steps: 36 | - uses: shorebirdtech/setup-shorebird@v1 37 | - uses: shorebirdtech/shorebird-release@v1 38 | id: shorebird-release 39 | with: 40 | args: --verbose --flavor=my-flavor --target=lib/special_main.dart 41 | flutter-version: 3.29.2 42 | platform: android 43 | working-directory: ./path/to/app 44 | ``` 45 | 46 | ## Inputs 47 | 48 | The action takes the following inputs: 49 | 50 | - `args`: Any arguments to pass to `shorebird release`. For example, if you need 51 | to specify a flavor, you can pass `--flavor=`. 52 | - Use an extra `--` to pass arguments to Flutter (e.g. `-- --dart-define=KEY=VALUE`) 53 | - `flutter-version`: Which Flutter version to build the release with 54 | - Use `latest` if you want to always target the latest stable version of Flutter support by Shorebird. 55 | - `platform`: Which platform to create a release for (e.g. `android` or `ios`) 56 | - `working-directory`: Which directory to run `shorebird release` in. 57 | 58 | ## Outputs 59 | 60 | The actions outputs the following: 61 | 62 | - `release-version`: The version of the release that was successfully created. 63 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | push: 10 | branches: 11 | - main 12 | 13 | env: 14 | SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} 15 | 16 | jobs: 17 | semantic-pull-request: 18 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 19 | 20 | e2e: 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | os: [macos-latest, ubuntu-latest, windows-latest] 25 | 26 | runs-on: ${{ matrix.os }} 27 | steps: 28 | - name: 📚 Git Checkout 29 | uses: actions/checkout@v6 30 | 31 | - name: 🎯 Set up Flutter 32 | uses: subosito/flutter-action@v2 33 | with: 34 | channel: stable 35 | cache: true 36 | 37 | - name: ☕ Set up Java 38 | uses: actions/setup-java@v5 39 | with: 40 | distribution: "temurin" 41 | java-version: "17" 42 | 43 | - name: 🐦 Setup Shorebird 44 | uses: shorebirdtech/setup-shorebird@v1 45 | 46 | - name: ✨ Create New Flutter Project 47 | run: flutter create e2e_test --empty 48 | 49 | - name: 🐦 Shorebird Init 50 | run: shorebird init --force --organization-id=14235 51 | working-directory: e2e_test 52 | 53 | - name: 🐦 Shorebird Release 54 | uses: ./ 55 | id: shorebird-release 56 | with: 57 | args: --verbose 58 | flutter-version: latest 59 | platform: android 60 | working-directory: e2e_test 61 | 62 | - name: 🚦 Assert Release Version (MacOS/Linux) 63 | if: runner.os != 'Windows' 64 | run: | 65 | if [[ ${{ steps.shorebird-release.outputs.release-version }} =~ "0.1.0+1" ]]; then 66 | echo '✅ Shorebird Release Succeeded!' 67 | else 68 | echo '❌ Shorebird Release Failed.' 69 | exit 1 70 | fi 71 | 72 | - name: 🚦 Assert Release Version (Windows) 73 | if: runner.os == 'Windows' 74 | run: | 75 | if ("${{ steps.shorebird-release.outputs.release-version }}" -match "0.1.0\+1") { 76 | Write-Output "✅ Shorebird Release Succeeded!" 77 | } else { 78 | Write-Output "❌ Shorebird Release Failed." 79 | exit 1 80 | } 81 | --------------------------------------------------------------------------------