Skip to content

Commit 315ef64

Browse files
ci: update to automatic deployment
1 parent db674e1 commit 315ef64

File tree

2 files changed

+12
-58
lines changed

2 files changed

+12
-58
lines changed

.github/workflows/base.yaml

Lines changed: 12 additions & 32 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
@@ -49,7 +45,6 @@ jobs:
4945
flutter build ios --debug --no-codesign
5046
5147
- name: Upload coverage to Codecov
52-
if: ${{ matrix.channel == 'stable' }}
5348
uses: codecov/codecov-action@v3
5449
with:
5550
files: coverage/lcov.info
@@ -60,30 +55,15 @@ jobs:
6055
if: ${{ github.ref_type == 'tag' }}
6156
needs: build
6257
name: Deploy package
58+
permissions:
59+
id-token: write
6360
runs-on: ubuntu-latest
64-
6561
steps:
66-
- name: Configure enviroment
67-
uses: actions/checkout@v3
68-
- name: Download flutter
69-
uses: subosito/flutter-action@v2
70-
with:
71-
channel: 'stable'
72-
- name: Setup pub credentials
73-
shell: bash
74-
env:
75-
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
76-
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
77-
run: |
78-
sh ./tool/pub_login.sh
79-
- name: Publish package
80-
run: dart pub publish -v -f
81-
- name: Build changelog
82-
id: github_release
83-
uses: mikepenz/release-changelog-builder-action@v3
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86-
- name: Create release
87-
uses: softprops/[email protected]
88-
with:
89-
body: ${{steps.github_release.outputs.changelog}}
62+
- uses: actions/checkout@v3
63+
- uses: dart-lang/setup-dart@v1
64+
- name: Flutter action
65+
uses: subosito/flutter-action@v2
66+
with:
67+
channel: 'stable'
68+
- name: Publish package
69+
run: dart pub publish -v -f

tool/pub_login.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)