Skip to content

Commit 21f1b21

Browse files
authored
Update .github/workflows/publish.yml (#8)
* Update .github/workflows/publish.yml * Upgrade pubspec.yaml * Upgrade version * Update CHANGELOG * Update workflow
1 parent a83fb72 commit 21f1b21

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
name: Publish to pub.dev
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+*'
57

68
jobs:
79
publish:
10+
runs-on: ubuntu-latest
11+
environment: 'pub.dev'
812
permissions:
913
id-token: write
10-
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dart-lang/setup-dart@v1
17+
18+
- name: Install dependencies
19+
run: dart pub get
20+
21+
- name: Run tests
22+
run: dart test
23+
24+
- name: Publish to pub.dev
25+
run: dart pub publish --force

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.2
2+
3+
- Added automated publishing workflow for pub.dev using GitHub Actions.
4+
15
## 0.0.1
26

37
- Added `cdf` and `pdf` functions.

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: normal_distribution
22
description: A minimal Dart module for working with normal distributions.
3-
version: 0.0.1
3+
version: 0.0.2
44
homepage: https://github.com/kaseken/normal_distribution
55

66
environment:
7-
sdk: '>=2.16.2 <3.0.0'
7+
sdk: '>=2.16.2 <4.0.0'
88

99
dev_dependencies:
1010
lints: ^1.0.0

0 commit comments

Comments
 (0)