Skip to content

Commit

Permalink
Setup release script
Browse files Browse the repository at this point in the history
  • Loading branch information
zeppelin committed Jan 26, 2024
1 parent f686ad1 commit c8bb421
Show file tree
Hide file tree
Showing 4 changed files with 2,465 additions and 7 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
tags:
- 'v*'

env:
VOLTA_FEATURE_PNPM: 1

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18

- name: install dependencies
run: pnpm install

- name: build
run: pnpm run build

- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: publish to npm
run: pnpm run release
19 changes: 19 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md"
}
},
"git": {
"commitMessage": "v${version}",
"tagName": "v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}",
"tokenRef": "GITHUB_AUTH"
},
"npm": {
"publish": false
}
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "svelte-promise-modals",
"version": "0.0.1",
"repository": "https://github.com/mainmatter/ember-promise-modals",
"scripts": {
"prepare": "svelte-kit sync",
"dev": "vite dev",
"build": "vite build && npm run package",
"preview": "vite preview",
"package": "svelte-kit sync && svelte-package && publint",
"release": "release-it",
"prepublishOnly": "npm run package",
"test:ct:debug": "PWDEBUG=1 playwright test -c playwright-ct.config.ts",
"test:ct": "playwright test -c playwright-ct.config.ts",
"changelog": "lerna-changelog",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
Expand Down Expand Up @@ -44,6 +47,7 @@
"devDependencies": {
"@playwright/experimental-ct-svelte": "1.40.1",
"@playwright/test": "1.40.1",
"@release-it-plugins/lerna-changelog": "^6.1.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
Expand Down Expand Up @@ -71,6 +75,7 @@
"prism-svelte": "^0.5.0",
"prismjs": "^1.29.0",
"publint": "^0.2.0",
"release-it": "^17.0.1",
"sinon": "^17.0.0",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
Expand Down
Loading

0 comments on commit c8bb421

Please sign in to comment.