-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1016 Bytes
/
publish.yml
File metadata and controls
44 lines (35 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publishing:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout 코드
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
- name: Dart 설정
uses: dart-lang/setup-dart@v1
with:
sdk: 'stable'
- name: 의존성 설치
run: dart pub get
- name: 코드 분석
run: dart analyze
- name: 현재 버전 확인
run: |
PACKAGE_VERSION=$(grep 'version:' pubspec.yaml | awk '{print $2}')
echo "현재 패키지 버전: $PACKAGE_VERSION"
- name: pub.dev에 패키지 배포
uses: k-paxian/dart-package-publisher@master
with:
skipTests: true
force: true
accessToken: ${{ secrets.PUB_DEV_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUB_DEV_REFRESH_TOKEN }}