Changelog #77
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: Changelog | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| update_mix_packages: | |
| type: boolean | |
| description: whether to update all mix-related packages | |
| default: true | |
| mix_version: | |
| type: string | |
| description: set the version for all mix-related packages | |
| default: "" | |
| update_remix: | |
| type: boolean | |
| description: whether to update remix | |
| default: true | |
| remix: | |
| type: string | |
| description: set specific version for remix | |
| default: "" | |
| update_naked: | |
| type: boolean | |
| description: whether to update naked | |
| default: true | |
| naked: | |
| type: string | |
| description: set specific version for naked | |
| default: "" | |
| jobs: | |
| version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install FVM | |
| shell: bash | |
| run: | | |
| curl -fsSL https://fvm.app/install.sh | bash | |
| fvm use mincompat --force | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
| - name: Flutter version | |
| shell: bash | |
| run: | | |
| flutter --version | |
| - name: Setup Melos | |
| run: | | |
| dart pub global activate melos | |
| melos bs | |
| - name: Configure Git User | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email 'action@github.com' | |
| - name: Creating the new version | |
| run: | | |
| git checkout -b release/package-versions | |
| git push --set-upstream origin release/package-versions | |
| ignored_packages="" | |
| if [ "${{ github.event.inputs.update_mix_packages }}" == "false" ]; then | |
| ignored_packages="$ignored_packages --ignore=mix,mix_lint,mix_annotations,mix_generator" | |
| fi | |
| if [ "${{ github.event.inputs.update_remix }}" == "false" ]; then | |
| ignored_packages="$ignored_packages --ignore=remix" | |
| fi | |
| if [ "${{ github.event.inputs.update_naked }}" == "false" ]; then | |
| ignored_packages="$ignored_packages --ignore=naked" | |
| fi | |
| packages_with_versions="" | |
| if [ "${{ github.event.inputs.mix_version }}" != "" ]; then | |
| packages_with_versions="$packages_with_versions -V mix:${{ github.event.inputs.mix_version }} mix_lint:${{ github.event.inputs.mix_version }} mix_annotations:${{ github.event.inputs.mix_version }} mix_generator:${{ github.event.inputs.mix_version }}" | |
| fi | |
| if [ "${{ github.event.inputs.remix }}" != "" ]; then | |
| packages_with_versions="$packages_with_versions -V remix:${{ github.event.inputs.remix }}" | |
| fi | |
| if [ "${{ github.event.inputs.naked }}" != "" ]; then | |
| packages_with_versions="$packages_with_versions -V naked:${{ github.event.inputs.naked }}" | |
| fi | |
| melos version $ignored_packages --yes --no-git-tag-version $packages_with_versions | |
| git push --follow-tags | |
| gh pr create --title "chore: version packages" --body "This PR was opened by the changelog GitHub Actions workflow" --reviewer leoafarias | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |