Skip to content

Commit 650c39f

Browse files
ci: implement automatic deployment package
1 parent 0dc44a4 commit 650c39f

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]
@@ -63,31 +63,16 @@ jobs:
6363
if: ${{ github.ref_type == 'tag' }}
6464
needs: build
6565
name: Deploy package
66+
permissions:
67+
id-token: write
6668
runs-on: ubuntu-latest
67-
6869
steps:
69-
- name: Configure enviroment
70-
uses: actions/checkout@v3
71-
- name: Download flutter
72-
uses: subosito/flutter-action@v2
73-
with:
74-
channel: 'stable'
75-
- name: Setup pub credentials
76-
shell: bash
77-
env:
78-
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
79-
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
80-
run: |
81-
sh ./tool/pub_login.sh
82-
- name: Publish package
83-
run: dart pub publish -v -f
84-
- name: Build changelog
85-
id: github_release
86-
uses: mikepenz/release-changelog-builder-action@v3
87-
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
- name: Create release
90-
uses: softprops/action-gh-release@v0.1.14
91-
with:
92-
body: ${{steps.github_release.outputs.changelog}}
70+
- uses: actions/checkout@v3
71+
- uses: dart-lang/setup-dart@v1
72+
- name: Flutter action
73+
uses: subosito/flutter-action@v2
74+
with:
75+
channel: 'stable'
76+
- name: Publish package
77+
run: dart pub publish -v -f
9378

tool/pub_login.sh

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

0 commit comments

Comments
 (0)