Skip to content

Manual Release

Manual Release #11

name: Manual Release
on:
workflow_dispatch:
inputs:
name:
type: choice
description: Package name (npm)
options:
- "@abstract-money/core"
- "@abstract-money/cli"
- "@abstract-money/react"
- "@abstract-money/provider-graz"
- "@abstract-money/provider-cosmoskit"
# TODO: Infer from package name
path:
type: choice
description: Directory name (packages/*)
options:
- "core"
- "cli"
- "react"
- "provider-graz"
- "provider-cosmoskit"
env:
FORCE_COLOR: true
jobs:
release-manual:
name: Publish manually
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
submodules: true
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Determine version
uses: ./.github/actions/version-pr
id: determine-version
env:
PACKAGE_PATH: ${{ github.event.inputs.path }}
- name: Publish to npm
run: |
pnpm build
cd packages/$PACKAGE_PATH
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
pnpm publish --no-git-checks --access public --tag experimental
echo "🎉 Experimental release published 📦️ on npm: https://npmjs.com/package/${{ github.event.inputs.name }}/v/${{ env.VERSION }}"
echo "Install via: pnpm add ${{ env.PACKAGE_NAME }}@${{ env.VERSION }}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PACKAGE_PATH: ${{ github.event.inputs.path }}
PACKAGE_NAME: ${{ github.event.inputs.name }}
VERSION: ${{ steps.determine-version.outputs.version }}