Skip to content

Commit 5e6c21f

Browse files
ci: add release workflows (#15)
1 parent bf93fd0 commit 5e6c21f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to pub.dev
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+*" # tag pattern on pub.dev: 'v{{version}'
7+
8+
# Publish using custom workflow
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: dart-lang/setup-dart@v1
15+
- name: Install dependencies
16+
run: dart pub get
17+
- name: Check Publish Warnings
18+
run: dart pub publish --dry-run
19+
- name: Publish
20+
uses: k-paxian/[email protected]
21+
with:
22+
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
23+
skipTests: true

.github/workflows/release.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: semantic-release
11+
runs-on: ubuntu-20.04
12+
outputs:
13+
new-release-published: ${{ steps.semantic-release.outputs.new_release_published }}
14+
new-release-version: ${{ steps.semantic-release.outputs.new_release_version }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: false
20+
- id: semantic-release
21+
uses: cycjimmy/semantic-release-action@v4
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }}

0 commit comments

Comments
 (0)