Skip to content

Commit a362226

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

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,28 @@ concurrency:
2424
group: ${{ github.workflow }}-${{ github.ref }}
2525

2626
jobs:
27+
check-permissions:
28+
runs-on: ubuntu-latest
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
steps:
32+
- name: Check Main Branch
33+
if: github.ref != 'refs/heads/main'
34+
run: |
35+
echo "❌ Этот workflow может быть запущен только на основной ветке (main)"
36+
exit 1
37+
38+
- name: Verify Release Team
39+
run: |
40+
if ! gh api "orgs/cdek-it/teams/react-native-release/memberships/$GITHUB_ACTOR" --silent 2>/dev/null; then
41+
echo "❌ Этот workflow может быть запущен только участниками команды release"
42+
exit 1
43+
fi
44+
45+
- run: exit 1
2746
install:
2847
runs-on: ubuntu-latest
48+
needs: check-permissions
2949
steps:
3050
- uses: actions/checkout@v6
3151
- uses: ./.github/actions/setup-node

0 commit comments

Comments
 (0)