Skip to content

Commit ff53bd9

Browse files
committed
ci: move "NPM Publish (Dry Run)" to Github Actions
1 parent a5a61a4 commit ff53bd9

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

.ado/apple-pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ stages:
2626
dependsOn: []
2727
jobs:
2828
- template: /.ado/jobs/test-javascript.yml@self
29-
- template: /.ado/jobs/npm-publish-dry-run.yml@self
3029

3130
# https://github.com/microsoft/react-native-macos/issues/2344
3231
# The Verdaccio server consistently hangs on creation, which is required for the integration tests

.github/workflows/microsoft-pr.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, edited]
6+
branches: [ "main", "*-stable", "release/*" ]
7+
8+
concurrency:
9+
# Ensure single build of a pull request. `main` should not be affected.
10+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint-commit:
15+
name: "Lint PR title"
16+
permissions: {}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
filter: blob:none
22+
fetch-depth: 0
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: '22'
26+
# We lint the PR title instead of the commit message to avoid script injection attacks.
27+
# Using environment variables prevents potential security vulnerabilities as described in:
28+
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#example-of-a-script-injection-attack
29+
- name: Lint PR title
30+
env:
31+
PR_TITLE: ${{ github.event.pull_request.title }}
32+
run: |
33+
echo "$PR_TITLE" | npx @rnx-kit/[email protected]
34+
npm-publish-dry-run:
35+
name: "NPM Publish (Dry Run)"
36+
permissions: {}
37+
runs-on: ubuntu-latest
38+
env:
39+
PUBLISH_TAG: 'latest'
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
filter: blob:none
44+
fetch-depth: 0
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: '22'
48+
- name: Configure git
49+
run: |
50+
git config --global user.email "[email protected]"
51+
git config --global user.name "React-Native Bot"
52+
git remote set-url origin https://rnbot:${{ secrets.GITHUB_TOKEN }}@github.com/microsoft/react-native-macos
53+
- name: Install dependencies
54+
run: yarn
55+
- name: Verify release config
56+
run: |
57+
node .ado/scripts/prepublish-check.mjs --verbose --skip-auth --tag ${{ env.PUBLISH_TAG }}
58+
- name: Version and publish packages (dry run)
59+
run: |
60+
echo "Target branch: ${{ github.base_ref }}"
61+
yarn nx release --dry-run --verbose
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
react-native-macos: patch
3+
'@react-native-mac/virtualized-lists': patch
4+
---
5+
6+
new patch release

0 commit comments

Comments
 (0)