Skip to content

Commit

Permalink
ci: add release workflows (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
HomelessDinosaur authored Mar 12, 2024
1 parent bf93fd0 commit 5e6c21f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Check Publish Warnings
run: dart pub publish --dry-run
- name: Publish
uses: k-paxian/[email protected]
with:
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
skipTests: true
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: semantic-release
runs-on: ubuntu-20.04
outputs:
new-release-published: ${{ steps.semantic-release.outputs.new_release_published }}
new-release-version: ${{ steps.semantic-release.outputs.new_release_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- id: semantic-release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.NITRIC_BOT_TOKEN }}

0 comments on commit 5e6c21f

Please sign in to comment.