Skip to content

Commit a540e39

Browse files
authored
Merge pull request #1 from JairajJangle/develop
chore: release prep
2 parents eb0ad02 + b7cd69b commit a540e39

5 files changed

Lines changed: 2336 additions & 57 deletions

File tree

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
custom: ["https://www.paypal.com/paypalme/jairajjangle001/usd", "https://github.com/JairajJangle/OpenCV-Catalogue/blob/master/.github/Jairaj_Jangle_Google_Pay_UPI_QR_Code.jpg"]
4+
liberapay: FutureJJ
5+
ko_fi: futurejj
6+
7+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
8+
patreon: # Replace with a single Patreon username
9+
open_collective: # Replace with a single Open Collective username
10+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
11+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
12+
issuehunt: # Replace with a single IssueHunt username
13+
otechie: # Replace with a single Otechie username

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,38 @@ jobs:
161161
with:
162162
name: ios-error-log
163163
path: ios_errorlog.txt
164+
165+
publish-npm:
166+
needs: [lint, test, build-library, build-android, build-ios]
167+
runs-on: ubuntu-latest
168+
permissions:
169+
contents: write # To publish a GitHub release
170+
issues: write # To comment on released issues
171+
pull-requests: write # To comment on released pull requests
172+
id-token: write # To enable use of OIDC for npm provenance
173+
if: github.ref == 'refs/heads/main'
174+
steps:
175+
- name: Checkout
176+
uses: actions/checkout@v4
177+
with:
178+
fetch-depth: 0 # Ensures all tags are fetched
179+
180+
- name: Setup
181+
uses: ./.github/actions/setup
182+
183+
- name: Setup Node.js
184+
uses: actions/setup-node@v4
185+
with:
186+
node-version: "lts/*" # Use the latest LTS version of Node.js
187+
registry-url: 'https://registry.npmjs.org/' # Specify npm registry
188+
189+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
190+
run: npm audit signatures # Check the signatures to verify integrity
191+
192+
- name: Release
193+
run: npx semantic-release # Run semantic-release to manage versioning and publishing
194+
env:
195+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
196+
197+
# Why NODE_AUTH_TOKEN instead of NPM_TOKEN: https://github.com/semantic-release/semantic-release/issues/2313
198+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm token for publishing package

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@
5757
"author": "Jairaj Jangle <reachout.jairaj.jangle@gmail.com> (https://github.com/JairajJangle)",
5858
"license": "MIT",
5959
"bugs": {
60-
"url": "https://github.com/JairajJangle/react-native-tiny-wavpack-decoder/issues"
60+
"url": "https://github.com/JairajJangle/react-native-tiny-wavpack-decoder/issues",
61+
"email": "reachout.jairaj.jangle@gmail.com"
6162
},
6263
"homepage": "https://github.com/JairajJangle/react-native-tiny-wavpack-decoder#readme",
6364
"publishConfig": {
64-
"registry": "https://registry.npmjs.org/"
65+
"registry": "https://registry.npmjs.org/",
66+
"provenance": true
6567
},
6668
"devDependencies": {
6769
"@commitlint/config-conventional": "^19.6.0",
@@ -71,7 +73,11 @@
7173
"@evilmartians/lefthook": "^1.5.0",
7274
"@react-native-community/cli": "15.0.1",
7375
"@react-native/eslint-config": "^0.78.0",
74-
"@release-it/conventional-changelog": "^9.0.2",
76+
"@release-it/conventional-changelog": "^10.0.0",
77+
"@semantic-release/changelog": "^6.0.3",
78+
"@semantic-release/git": "^10.0.1",
79+
"@semantic-release/github": "^11.0.1",
80+
"@semantic-release/npm": "^12.0.1",
7581
"@types/jest": "^29.5.5",
7682
"@types/react": "^19.0.0",
7783
"commitlint": "^19.6.1",
@@ -85,6 +91,7 @@
8591
"react-native": "0.78.2",
8692
"react-native-builder-bob": "^0.40.6",
8793
"release-it": "^17.10.0",
94+
"semantic-release": "^24.1.0",
8895
"turbo": "^1.10.7",
8996
"typescript": "^5.2.2"
9097
},

release.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
branches: [
3+
'main',
4+
{
5+
name: 'beta',
6+
prerelease: true, // Marks this as a prerelease channel
7+
},
8+
],
9+
plugins: [
10+
'@semantic-release/commit-analyzer', // Analyzes commits for version bumping
11+
'@semantic-release/release-notes-generator', // Generates release notes
12+
'@semantic-release/changelog', // Generates the changelog
13+
[
14+
'@semantic-release/npm',
15+
{
16+
npmPublish: true,
17+
tag: 'beta', // Publishes with a 'beta' tag to npm
18+
},
19+
],
20+
'@semantic-release/github', // Handles GitHub releases
21+
[
22+
'@semantic-release/git',
23+
{
24+
assets: ['package.json', 'yarn.lock', 'CHANGELOG.md'],
25+
message:
26+
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
27+
},
28+
],
29+
],
30+
};

0 commit comments

Comments
 (0)