Skip to content

chore( zeta_flutter_utils): release 1.0.0 #58

chore( zeta_flutter_utils): release 1.0.0

chore( zeta_flutter_utils): release 1.0.0 #58

Workflow file for this run

name: CI - On Release
on:
workflow_dispatch:
push:
tags:
- "zeta_*v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
inputs:
package:
description: "Package to release"
type: choice
options:
- all
- zeta_flutter
- zeta_flutter_theme
- zeta_flutter_utils
- zeta_icons
jobs:
check-package:
runs-on: ubuntu-latest
permissions:
id-token: write
environment: pub.dev
steps:
- name: Set package to publish (workflow dispatch)
if: github.event_name == 'workflow_dispatch'
run: echo package=${{ github.event.inputs.package }} >> $GITHUB_ENV
- name: Set package to publish (tag push)
if: github.event_name == 'push'
run: |
echo "package=all" >> $GITHUB_ENV
for package in all zeta_flutter_theme zeta_flutter_utils zeta_icons zeta_flutter; do
if [[ "${{GITHUB_REF}}" == *"${package}"* ]]; then
echo Package is $package
echo "package=${package}" >> $GITHUB_ENV
break
fi
done
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.27.x
- name: Install dependencies
run: flutter pub get
- name: Install melos
run: dart pub global activate melos
- name: Check Publish Warnings
run: melos publish --dry-run
- name: Publish all
if: ${{ env.package == 'all' }}
run: melos publish --no-dry-run
- name: Publish individual package
if: ${{ env.package != 'all' }}
run: |
cd packages/${{ env.package }}
dart format . --fix
dart fix --apply
flutter pub publish --dry-run
flutter pub publish --no-dry-run
deploy-website:
runs-on: ubuntu-latest
needs: check-package
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'zebratechnologies',
repo: 'zeta',
workflow_id: 'deploy.yml',
ref: 'main',
})