-
-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (33 loc) · 971 Bytes
/
publish.yaml
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
name: Publish to pub.dev
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*" # tag pattern on pub.dev: 'v{{version}'
# Publish using custom workflow
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Add version
run: |
echo -e "\n\nversion: ${GITHUB_REF_NAME##v}" >> pubspec.yaml
- name: Update CHANGELOG
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.NITRIC_BOT_TOKEN }}
fromTag: ${{ github.ref_name }}
toTag: v1.0.0
writeToFile: true
- name: Check Publish Warnings
run: dart pub publish --dry-run
- name: Publish
uses: k-paxian/[email protected]
with:
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
skipTests: true