|
4 | 4 | push:
|
5 | 5 | branches: [main]
|
6 | 6 | tags:
|
7 |
| - - '*' |
| 7 | + - '[0-9]+.[0-9]+.[0-9]+*' |
8 | 8 |
|
9 | 9 | pull_request:
|
10 | 10 | branches: [main]
|
|
14 | 14 | jobs:
|
15 | 15 | build:
|
16 | 16 | runs-on: macos-latest
|
17 |
| - strategy: |
18 |
| - fail-fast: false |
19 |
| - matrix: |
20 |
| - channel: [stable, beta] |
21 | 17 |
|
22 | 18 | steps:
|
23 | 19 | - uses: actions/checkout@v3
|
|
30 | 26 | - name: Flutter action
|
31 | 27 | uses: subosito/flutter-action@v2
|
32 | 28 | with:
|
33 |
| - channel: ${{ matrix.channel }} |
| 29 | + channel: 'stable' |
34 | 30 |
|
35 | 31 | - name: Install dependencies
|
36 | 32 | run: flutter pub get
|
@@ -61,31 +57,25 @@ jobs:
|
61 | 57 | if: ${{ github.ref_type == 'tag' }}
|
62 | 58 | needs: build
|
63 | 59 | name: Deploy package
|
| 60 | + permissions: |
| 61 | + id-token: write |
64 | 62 | runs-on: ubuntu-latest
|
65 |
| - |
66 | 63 | steps:
|
67 |
| - - name: Configure enviroment |
68 |
| - uses: actions/checkout@v3 |
69 |
| - - name: Download flutter |
70 |
| - uses: subosito/flutter-action@v2 |
71 |
| - with: |
72 |
| - channel: 'stable' |
73 |
| - - name: Setup pub credentials |
74 |
| - shell: bash |
75 |
| - env: |
76 |
| - PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }} |
77 |
| - PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }} |
78 |
| - run: | |
79 |
| - sh ./tool/pub_login.sh |
80 |
| - - name: Publish package |
81 |
| - run: dart pub publish -v -f |
82 |
| - - name: Build changelog |
83 |
| - id: github_release |
84 |
| - uses: mikepenz/release-changelog-builder-action@v3 |
85 |
| - env: |
86 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
87 |
| - - name: Create release |
88 |
| - uses: softprops/action-gh-release@v0.1.14 |
89 |
| - with: |
90 |
| - body: ${{steps.github_release.outputs.changelog}} |
| 64 | + - uses: actions/checkout@v3 |
| 65 | + - uses: dart-lang/setup-dart@v1 |
| 66 | + - name: Flutter action |
| 67 | + uses: subosito/flutter-action@v2 |
| 68 | + with: |
| 69 | + channel: 'stable' |
| 70 | + - name: Publish package |
| 71 | + run: dart pub publish -v -f |
| 72 | + - name: Build changelog |
| 73 | + id: github_release |
| 74 | + uses: mikepenz/release-changelog-builder-action@v3 |
| 75 | + env: |
| 76 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + - name: Create release |
| 78 | + uses: softprops/action-gh-release@v1 |
| 79 | + with: |
| 80 | + body: ${{steps.github_release.outputs.changelog}} |
91 | 81 |
|
0 commit comments