Skip to content

Commit

Permalink
release workflow for nitrite
Browse files Browse the repository at this point in the history
  • Loading branch information
anidotnet committed Jan 12, 2024
1 parent 832aba5 commit 6bcf127
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 39 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:

- name: Setup Build System
shell: bash
run: ./.github/workflows/scripts/install-tools.sh
run: |
chmod +x ./.github/workflows/scripts/install-tools.sh
./.github/workflows/scripts/install-tools.sh
- name: Build Nitrite
run: melos run test
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/nitrite-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Nitrite

on:
push:
tags:
- 'nitrite-v[0-9]+.[0-9]+.[0-9]+*'

jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Setup Build System
shell: bash
run: |
chmod +x ./.github/workflows/scripts/install-tools.sh
./.github/workflows/scripts/install-tools.sh
- name: Generate Code
run: melos run generate

- name: Generate Docs
run: melos run dartdoc

- name: Publish Nitrite
run: dart pub publish -f
working-directory: packages/nitrite
80 changes: 42 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
name: Release Nitrite

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
publish:
name: Publish Nitrite to pub.dev
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Setup Build System
shell: bash
run: |
chmod +x ./.github/workflows/scripts/install-tools.sh
./.github/workflows/scripts/install-tools.sh
- name: Build Nitrite
run: melos run test:without-coverage

- name: Generate Docs
run: melos run dartdoc

- name: Publish Nitrite
run: melos run publish
#name: Release Nitrite
#
#on:
# push:
# tags:
# - 'nitrite_generator-v[0-9]+.[0-9]+.[0-9]+*'
# - 'nitrite_spatial-v[0-9]+.[0-9]+.[0-9]+*'
# - 'nitrite_hive_adapter-v[0-9]+.[0-9]+.[0-9]+*'
# - 'nitrite_support-v[0-9]+.[0-9]+.[0-9]+*'
# - 'nitrite-v[0-9]+.[0-9]+.[0-9]+*'
#
#jobs:
# publish:
# name: Publish Nitrite to pub.dev
# permissions:
# id-token: write
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Setup Flutter
# uses: subosito/flutter-action@v2
# with:
# channel: 'stable'
#
# - name: Setup Build System
# shell: bash
# run: |
# chmod +x ./.github/workflows/scripts/install-tools.sh
# ./.github/workflows/scripts/install-tools.sh
#
# - name: Build Nitrite
# run: melos run test:without-coverage
#
# - name: Generate Docs
# run: melos run dartdoc
#
# - name: Publish Nitrite
# run: melos run publish

0 comments on commit 6bcf127

Please sign in to comment.