-
-
Notifications
You must be signed in to change notification settings - Fork 393
68 lines (60 loc) · 2 KB
/
release-pull-request.yml
File metadata and controls
68 lines (60 loc) · 2 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release Pull Request
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Release Type (next, beta, alpha, latest)'
required: true
default: 'latest'
options:
- next
- beta
- alpha
- latest
jobs:
release:
name: Create Release Pull Request
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v5
with:
# This makes Actions fetch only one branch to release
fetch-depth: 10
- name: Cache Tool Downloads
uses: actions/cache@v5
with:
path: ~/.cache
key: ${{ runner.os }}-toolcache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-toolcache-
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4
- name: Install Dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
# assemble-release-plan is forked, so need to build it before execute pnpm changeset version
- name: Build Internal Changesets Dependencies
run: npx nx build assemble-release-plan
- name: Create Release Pull Request
uses: module-federation/actions@v2
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
version: ${{ github.event.inputs.version || 'latest' }}
versionNumber: 'auto'
type: 'pull request'
tools: 'changeset'
coreNpmName: '@module-federation/runtime'
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}