Skip to content

Commit

Permalink
👷 Update package.json and release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaem1n207 authored and 이재민 committed Jan 26, 2024
1 parent a3345df commit e3730e2
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 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

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 Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build
run: bun run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bun run release
Binary file modified bun.lockb
Binary file not shown.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"homepage": "https://github.com/jaem1n207/synchronize-tab-scrolling#readme",
"keywords": [
"chrome",
"firefox",
"webstore",
"extension"
],
Expand All @@ -23,6 +24,7 @@
"start": "bun run build:static-script && __WATCH__=true bunx --bun vite build -w",
"build:static-script": "bun run build-static-script.js",
"build": "bun run build:static-script && vite build",
"release": "semantic-release",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand All @@ -34,6 +36,8 @@
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
Expand All @@ -54,6 +58,7 @@
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"semantic-release": "^23.0.0",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.4.1",
Expand Down
47 changes: 47 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* @type {import('@types/semantic-release').GlobalConfig}
*/
export default {
branches: ['main'],
repositoryUrl: 'https://github.com/jaem1n207/synchronize-tab-scrolling.git',
tagFormat: 'v${version}',
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits'
}
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits'
}
],
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md'
}
],
[
'@semantic-release/npm',
{
npmPublish: false
}
],
[
'@semantic-release/github',
{
assets: ['CHANGELOG.md']
}
],
[
'@semantic-release/git',
{
assets: ['package.json', 'CHANGELOG.md'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
]
]
};

0 comments on commit e3730e2

Please sign in to comment.