Skip to content

Commit 7a776c7

Browse files
committed
ci: move "NPM Publish (Dry Run)" to Github Actions
1 parent 4a29cef commit 7a776c7

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
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: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: PR
33
on:
44
pull_request:
55
types: [opened, synchronize, edited]
6-
branches: [ "main" ]
6+
branches: [ "main", "*-stable", "release/*" ]
77

88
concurrency:
99
# Ensure single build of a pull request. `main` should not be affected.
1010
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
1111
cancel-in-progress: true
1212

1313
jobs:
14-
lint-commit:
14+
lint-title:
1515
name: "Lint PR title"
1616
permissions: {}
1717
runs-on: ubuntu-latest
@@ -34,5 +34,34 @@ jobs:
3434
build-website:
3535
name: "Build the website"
3636
permissions: {}
37+
if: github.base_ref == 'main'
3738
uses: ./.github/workflows/microsoft-build-website.yml
39+
npm-publish-dry-run:
40+
name: "NPM Publish (Dry Run)"
41+
permissions: {}
42+
runs-on: ubuntu-latest
43+
env:
44+
PUBLISH_TAG: 'latest'
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
filter: blob:none
49+
fetch-depth: 0
50+
- uses: actions/setup-node@v4
51+
with:
52+
node-version: '22'
53+
- name: Configure git
54+
run: |
55+
git config --global user.email "[email protected]"
56+
git config --global user.name "React-Native Bot"
57+
git remote set-url origin https://rnbot:${{ secrets.GITHUB_TOKEN }}@github.com/microsoft/react-native-macos
58+
- name: Install dependencies
59+
run: yarn
60+
- name: Verify release config
61+
run: |
62+
node .ado/scripts/prepublish-check.mjs --verbose --skip-auth --tag ${{ env.PUBLISH_TAG }}
3863
64+
- name: Version and publish packages (dry run)
65+
run: |
66+
echo "Target branch: ${{ github.base_ref }}"
67+
yarn nx release --dry-run --verbose

0 commit comments

Comments
 (0)