Skip to content

Commit 986c430

Browse files
committed
ci: npm-publish checks
1 parent d60254f commit 986c430

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,26 @@ jobs:
6666
id-token: write # REQUIRED FOR OIDC
6767
env:
6868
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6970
steps:
71+
- name: Check Main Branch
72+
if: github.ref != 'refs/heads/main'
73+
run: |
74+
echo "❌ Этот workflow может быть запущен только на основной ветке (main)"
75+
exit 1
76+
77+
- name: Verify Release Team
78+
run: |
79+
RELEASE_TEAM_MEMBERS=$(gh api "orgs/cdek-it/teams/react-native-release/members" \
80+
--jq 'map(.login)')
81+
82+
if ! echo "$RELEASE_TEAM_MEMBERS" | grep -q "$GITHUB_ACTOR"; then
83+
echo "❌ Этот workflow может быть запущен только участниками команды release"
84+
exit 1
85+
fi
86+
87+
- run: exit 1
88+
7089
- uses: actions/checkout@v6
7190
with:
7291
fetch-depth: 0

0 commit comments

Comments
 (0)