Skip to content

Commit 83f4dcb

Browse files
ci: improve to automatic deployment
1 parent 3d3f969 commit 83f4dcb

File tree

2 files changed

+11
-52
lines changed

2 files changed

+11
-52
lines changed

.github/workflows/base.yaml

Lines changed: 11 additions & 26 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]
@@ -56,31 +56,16 @@ jobs:
5656
if: ${{ github.ref_type == 'tag' }}
5757
needs: build
5858
name: Deploy package
59+
permissions:
60+
id-token: write
5961
runs-on: ubuntu-latest
60-
6162
steps:
62-
- name: Configure enviroment
63-
uses: actions/checkout@v3
64-
- name: Download flutter
65-
uses: subosito/flutter-action@v2
66-
with:
67-
channel: 'stable'
68-
- name: Setup pub credentials
69-
shell: bash
70-
env:
71-
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
72-
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
73-
run: |
74-
sh ./tool/pub_login.sh
75-
- name: Publish package
76-
run: dart pub publish -v -f
77-
- name: Build changelog
78-
id: github_release
79-
uses: mikepenz/release-changelog-builder-action@v3
80-
env:
81-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82-
- name: Create release
83-
uses: softprops/[email protected]
84-
with:
85-
body: ${{steps.github_release.outputs.changelog}}
63+
- uses: actions/checkout@v3
64+
- uses: dart-lang/setup-dart@v1
65+
- name: Flutter action
66+
uses: subosito/flutter-action@v2
67+
with:
68+
channel: 'stable'
69+
- name: Publish package
70+
run: dart pub publish -v -f
8671

tool/pub_login.sh

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

0 commit comments

Comments
 (0)