Skip to content

Draft release for charts-web #359

Draft release for charts-web

Draft release for charts-web #359

name: Create draft release
run-name: Draft release for ${{ inputs.package }}
on:
workflow_dispatch:
inputs:
package:
description: "Package name to release (name in package.json)"
required: true
jobs:
create-release:
name: "Create widget/module release on GitHub"
runs-on: ubuntu-latest
env:
PACKAGE: ${{ github.event.inputs.package }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Search for package in workspace
run: >
if [[ -z "$(pnpm ls --json --filter=$PACKAGE)" ]];
then
echo "::error::Package $PACKAGE not found in workspace.";
exit 1;
fi
- name: Install dependencies
run: pnpm install
- name: Create ${{ github.event.inputs.package }} widget release
run: pnpm run create-gh-release --filter=$PACKAGE
env:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_EMAIL: ${{ secrets.GH_EMAIL }}
GH_NAME: ${{ secrets.GH_NAME }}
GH_PAT: ${{ secrets.GH_PAT }}