Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
branches:
- main

permissions:
contents: write

Check warning on line 12 in .github/workflows/cd.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=checkout_frames-react-native&issues=AZ9gISVYZTp61jSJFDu_&open=AZ9gISVYZTp61jSJFDu_&pullRequest=78

jobs:
test-and-coverage:
runs-on: ubuntu-latest
Expand All @@ -25,12 +28,33 @@
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

publish-npm:
bump-version:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: test-and-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Bump patch version and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
npm version patch -m "chore(release): v%s [skip ci]"
git push origin HEAD:main --follow-tags

publish-npm:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: bump-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: 21
Expand Down
Loading