Skip to content

Commit 797bb46

Browse files
authored
Merge pull request #18 from contentstack/fix/workflow
Update workflow configurations
2 parents 6d47f54 + a2ca59b commit 797bb46

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# .github/workflows/publish.yml
2+
name: Publish to pub.dev
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v[0-9]+.[0-9]+.[0-9]+' # must match tag pattern on pub.dev (e.g. 'v{{version}}')
8+
workflow_dispatch: # manual trigger: runs dry-run only (pub.dev accepts publish only on tag push)
9+
10+
jobs:
11+
publish:
12+
permissions:
13+
id-token: write # Required for OIDC authentication
14+
name: 'Publish to pub.dev'
15+
environment: 'pub.dev'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dart-lang/setup-dart@v1
20+
with:
21+
sdk: stable
22+
- name: Install dependencies
23+
run: dart pub get
24+
- name: Test Publish (Dry Run)
25+
run: dart pub publish --dry-run
26+
- name: Publish
27+
run: dart pub publish --force

0 commit comments

Comments
 (0)