Added codegen #140
This file contains 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: Flutter Publisher | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/publisher.yml | |
- pubspec.yaml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate | |
uses: peiffer-innovations/actions-flutter-validate@v1 | |
- name: Checkout Schemas | |
uses: actions/checkout@v3 | |
with: | |
repository: peiffer-innovations/flutter_json_schemas | |
token: ${{ secrets.REPO_TOKEN }} | |
fetch-depth: 0 | |
ref: gh-pages | |
path: schemas | |
- name: Update Schemas | |
run: | | |
git config --global user.email "noop@peifferinnovations.com" | |
git config --global user.name "action" | |
git config --global url."https://action:${{secrets.REPO_TOKEN}}@github.com/".insteadOf https://github.com/ | |
rm -rf schemas/schemas/json_theme | |
mkdir schemas/schemas/json_theme | |
cp output/* schemas/schemas/json_theme | |
cd schemas | |
git add . | |
git commit --allow-empty -m "json_theme: schema update" | |
git push origin HEAD:gh-pages | |
cd .. | |
- name: Run Codegen | |
run: | | |
dart run build_runner build --delete-conflicting-outputs -v | |
- name: Publish | |
uses: peiffer-innovations/actions-pub-publish@v1.0.2 | |
with: | |
credentials: ${{ secrets.CREDENTIAL_JSON }} | |
- uses: peiffer-innovations/actions-dart-version-autotag@v2 | |
with: | |
token: ${{ secrets.REPO_TOKEN }} |