-
Notifications
You must be signed in to change notification settings - Fork 40
45 lines (42 loc) · 1.65 KB
/
CreateGitHubRelease.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- name: Setup node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
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 }}