Skip to content

fix: handle decoding error in JSON.parse #11

fix: handle decoding error in JSON.parse

fix: handle decoding error in JSON.parse #11

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ master ]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check_version:
name: Check Version
runs-on: ubuntu-latest
outputs:
git_tag_name: ${{ steps.tag_check.outputs.git_tag_name }}
steps:
- uses: actions/checkout@v2 # https://github.com/actions/checkout
- uses: CumulusDS/[email protected]
id: get_package_version
with:
file: pubspec.yaml
version: version
# debug
- name: Output package version
run: echo 'version:' ${{ steps.get_package_version.outputs.version }}
- uses: dudo/[email protected]
id: tag_check
with:
version: ${{ steps.get_package_version.outputs.version }}
git_tag_prefix: v
push_tag:
name: Push Tag
needs: check_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # https://github.com/actions/checkout
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{ needs.check_version.outputs.git_tag_name }}
publish_pub:
name: Publish new Pub version
needs: check_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Write version
uses: DamianReeves/[email protected]
with:
path: lib/src/utils/version.g.dart
contents: String version = "${{ needs.check_version.outputs.git_tag_name }}";
- name: Publish Dart/Flutter package
uses: sakebook/[email protected]
with:
credential: ${{ secrets.PUB_PUBLISHER_CREDENTIAL_JSON }}
flutter_package: false
skip_test: true
dry_run: false