Skip to content

Commit

Permalink
official way of publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-flagship committed Aug 30, 2023
1 parent 6688cb7 commit 0cf07ce
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Release to pub.dev

on:
workflow_dispatch:
push: #todo:remove
release:
types: [ created ]

push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
test:
Expand All @@ -15,9 +14,7 @@ jobs:

publish:
name: Publish
permissions:
id-token: write # This is required for authentication using OIDC
needs: [test]

runs-on: ubuntu-latest
timeout-minutes: 5

Expand All @@ -30,14 +27,11 @@ jobs:
with:
channel: "stable"

- name: Add pub token
run: echo ${{secrets.OAUTH_ACCESS_TOKEN}} | dart pub token add https://pub.dev

- name: Install dependencies
run: dart pub get

- name: code format
run: dart format lib/*/*.dart lib/*.dart

- name: Publish pkg
run: dart pub publish --server=https://pub.dartlang.org -f
- name: Publish
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1

0 comments on commit 0cf07ce

Please sign in to comment.