Skip to content

Commit 050d9b4

Browse files
ci: update pipeline to automatic deployment
1 parent 87ac702 commit 050d9b4

File tree

1 file changed

+21
-31
lines changed

1 file changed

+21
-31
lines changed

.github/workflows/base.yaml

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
tags:
7-
- '*'
7+
- '[0-9]+.[0-9]+.[0-9]+*'
88

99
pull_request:
1010
branches: [main]
@@ -14,10 +14,6 @@ on:
1414
jobs:
1515
build:
1616
runs-on: macos-latest
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
channel: [stable, beta]
2117

2218
steps:
2319
- uses: actions/checkout@v3
@@ -30,7 +26,7 @@ jobs:
3026
- name: Flutter action
3127
uses: subosito/flutter-action@v2
3228
with:
33-
channel: ${{ matrix.channel }}
29+
channel: 'stable'
3430

3531
- name: Install dependencies
3632
run: flutter pub get
@@ -61,31 +57,25 @@ jobs:
6157
if: ${{ github.ref_type == 'tag' }}
6258
needs: build
6359
name: Deploy package
60+
permissions:
61+
id-token: write
6462
runs-on: ubuntu-latest
65-
6663
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}}
9181

0 commit comments

Comments
 (0)