Skip to content

Commit

Permalink
first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-flagship committed Aug 30, 2023
1 parent 6a29b77 commit 49627e2
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 77 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/main.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: PR Checlk

on:
workflow_dispatch:
pull_request:

jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
secrets: inherit
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release to pub.dev

on:
workflow_dispatch:
push: #todo:remove
release:
types: [ created ]


jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
secrets: inherit

publish:
name: Publish
permissions:
id-token: write # This is required for authentication using OIDC
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

- uses: dart-lang/setup-dart@v1

- uses: subosito/flutter-action@v2
with:
channel: "stable"

- name: Add pub token
run: echo ${{secrets.OAUTH_ACCESS_TOKEN}} | dart pub token add https://pub.dev

- name: Install dependencies
run: dart pub get

- name: code format
run: dart format lib/*/*.dart lib/*.dart

- name: Publish pkg
run: dart pub publish --server=https://pub.dartlang.org -f
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test

on:
push: #todo:remove
workflow_call:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'

- name: Install packages dependencies
run: flutter pub get

- name: Analyze the project's Dart code
run: flutter analyze

- name: Run tests
run: flutter test

- name: Run tests coverage
run: flutter test --coverage
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://github.com/aissat/easy_localization
issue_tracker: https://github.com/aissat/easy_localization/issues
# publish_to: none

version: 3.0.3
version: 3.0.3-dev.1

environment:
sdk: '>=2.12.0 <4.0.0'
Expand Down

0 comments on commit 49627e2

Please sign in to comment.