Skip to content

Commit

Permalink
Adds semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnuss committed Nov 16, 2023
1 parent 62ace4e commit c5b37f2
Show file tree
Hide file tree
Showing 3 changed files with 1,635 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
run: pnpm install

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpx semantic-release
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-stripe",
"version": "0.0.25",
"version": "0.0.0-development",
"homepage": "https://sveltestripe.com",
"license": "MIT",
"scripts": {
Expand All @@ -10,7 +10,8 @@
"publish": "npm run package && cd package && npm publish",
"preview": "dotenv -c development vite preview",
"lint": "prettier --ignore-path .prettierignore --check --plugin-search-dir=. . && eslint --ignore-path .prettierignore .",
"format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. ."
"format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. .",
"semantic-release": "semantic-release"
},
"dependencies": {
"@stripe/stripe-js": "^2.1.11"
Expand All @@ -35,7 +36,18 @@
"svelte": "^3.46.4",
"svelte2tsx": "^0.5.6",
"typescript": "^4.6.2",
"vite": "^4.0.3"
"vite": "^4.0.3",
"semantic-release": "22.0.7"
},
"type": "module"
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/joshnuss/svelte-stripe.git"
},
"publishConfig": {
"access": "public"
},
"release": {
"branches": ["main", "next"]
}
}
Loading

1 comment on commit c5b37f2

@vercel
Copy link

@vercel vercel bot commented on c5b37f2 Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.