diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 8012de1..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Use Node.js - uses: actions/setup-node@v6 - with: - node-version: 24 - registry-url: https://registry.npmjs.org/ - cache: 'pnpm' - - run: pnpm install --frozen-lock - - name: Build the package - run: pnpm build - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Use Node.js - uses: actions/setup-node@v6 - with: - node-version: 24 - registry-url: https://registry.npmjs.org/ - cache: 'pnpm' - - name: Install Dependencies - run: pnpm install --frozen-lock - - name: Build the package - run: pnpm build - - name: Publish to NPM - run: pnpm publish --recursive --no-git-checks - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2466ef8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v5 + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v6 + with: + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + @anolilab/multi-semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..511bd71 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,19 @@ +{ + "branches": ["master"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogFile": "./CHANGELOG.md" + } + ], + "@semantic-release/git", + "@semantic-release/github" + ], + "extends": [ + "@anolilab/multi-semantic-release" + ], + "dryRun": false +} \ No newline at end of file diff --git a/package.json b/package.json index e81927a..1b58bb5 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,11 @@ "dotenv": "^17.0.0", "typescript": "^5.8.3", "vitest": "^3.1.2" + }, + "multi-release": { + "deps": { + "bump": "inherit" + }, + "tagFormat": "${name}@${version}" } } diff --git a/packages/core/package.json b/packages/core/package.json index 71495ae..e989501 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@discordanalytics/core", - "version": "3.5.4", + "version": "2.5.0", "description": "Core package to work with Discord Analytics", "main": "dist/index.js", "author": "Discord Analytics", diff --git a/packages/discordjs-light/package.json b/packages/discordjs-light/package.json index f1f10f6..b0cf881 100644 --- a/packages/discordjs-light/package.json +++ b/packages/discordjs-light/package.json @@ -1,6 +1,6 @@ { "name": "@discordanalytics/discordjs-light", - "version": "3.5.4", + "version": "2.5.0", "description": "Discord.js light package for working with Discord Analytics", "main": "dist/index.js", "author": "Discord Analytics", diff --git a/packages/discordjs/package.json b/packages/discordjs/package.json index 66aac21..3142c58 100644 --- a/packages/discordjs/package.json +++ b/packages/discordjs/package.json @@ -1,6 +1,6 @@ { "name": "@discordanalytics/discordjs", - "version": "3.5.4", + "version": "2.5.0", "description": "Discord.js package for working with Discord Analytics", "main": "dist/index.js", "author": "Discord Analytics", diff --git a/packages/eris/package.json b/packages/eris/package.json index c30b8a3..c241202 100644 --- a/packages/eris/package.json +++ b/packages/eris/package.json @@ -1,6 +1,6 @@ { "name": "@discordanalytics/eris", - "version": "3.5.4", + "version": "2.5.0", "description": "Eris package for working with Discord Analytics", "main": "dist/index.js", "author": "Discord Analytics", diff --git a/packages/oceanic/package.json b/packages/oceanic/package.json index 5d82585..1f4fee2 100644 --- a/packages/oceanic/package.json +++ b/packages/oceanic/package.json @@ -1,6 +1,6 @@ { "name": "@discordanalytics/oceanic", - "version": "3.5.4", + "version": "2.5.0", "description": "Oceanic package for working with Discord Analytics", "main": "dist/index.js", "author": "Discord Analytics",