Skip to content

chore(release): publish packages #12

chore(release): publish packages

chore(release): publish packages #12

Workflow file for this run

name: Publish Release(s)
on:
workflow_dispatch:
inputs:
dry_run:
description: "Dry run? (true/false)"
type: boolean
default: false
push:
tags:
- "*"
jobs:
publish_github_release:
# macOS because we can cross-compile to all other platforms from it
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
- uses: goto-bus-stop/setup-zig@v2
- uses: KyleMayes/install-llvm-action@v1
with:
version: "15"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25b
- name: Build all library binaries
run: melos run build
- name: Create GitHub release
if: inputs.dry_run != 'true'
uses: softprops/action-gh-release@v1
with:
files: platform-build/*
- name: Artifacts
if: inputs.dry_run == 'true'
uses: actions/upload-artifact@v2
with:
name: Libraries
path: platform-build/
# publish_pub_release:
# needs: publish_github_release
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: subosito/flutter-action@v2
# - uses: bluefireteam/melos-action@v2
# # On Linux, open the file at ~/.config/dart/pub-credentials.json
# # and copy the contents into the secret PUB_CRED_JSON
# - name: Setup pub.dev credentials
# run: |
# mkdir -p $HOME/.config/dart
# cat << EOF > $HOME/.config/dart/pub-credentials.json
# ${{ secrets.PUB_CRED_JSON }}
# EOF
# - name: Dry-run publish to pub.dev
# run: melos publish -y --dry-run
# - name: Publish to pub.dev
# run: melos publish -y --no-dry-run