Skip to content

CI - On Release

CI - On Release #40

Workflow file for this run

name: CI - On Release
on:
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: |
# p=zeta_flutter
# for package in all zeta_flutter zeta_flutter_theme zeta_flutter_utils zeta_icons; do
# if [[ "${GITHUB_REF}" == *"${package}"* ]]; then
# p=$package
# break
# fi
# echo "package=${p}" >> $GITHUB_ENV
# done
- name: Set package to publish (dispatch test)
# if: github.event_name == 'push'
run: |
echo "package=all" >> $GITHUB_ENV
for package in all zeta_flutter zeta_flutter_theme zeta_flutter_utils zeta_icons; do
if [[ "${{github.event.inputs.package}}" == *"${package}"* ]]; then
echo Package is $package
echo "package=${package}" >> $GITHUB_ENV
break
fi
done
- name: test
run: echo ${{env.package}}
# - 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 }}
# 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',
# })