Skip to content

Commit

Permalink
chore: minor debug
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialcoder committed Feb 11, 2025
1 parent d1e4698 commit 6e26144
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
versioning:
publish_package:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'

# Install dependencies
# Install all dependencies (including devDependencies for lint/test/build)
- name: Install dependencies
run: yarn install --frozen-lockfile --production
run: yarn install

# Run linting
- name: Run lint
Expand All @@ -38,21 +39,18 @@ jobs:
- name: Build client
run: yarn build-client

# Verify NPM_TOKEN
- name: Verify NPM_TOKEN
run: |
echo "NPM_TOKEN=$NPM_TOKEN"
curl -H "Authorization: Bearer $NPM_TOKEN" https://registry.npmjs.org/-/whoami
# Semantic release step: Automatically determine the version and release
- name: Semantic Release for versioning
- name: Semantic release the package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
# Optionally, you can include a job to deploy to npm
publish:
needs: release
runs-on: ubuntu-latest
steps:
# Publish to npm
- name: Publish to npm
run: yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
echo $NPM_TOKEN > ~/.npmrc
yarn release --debug
25 changes: 25 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"package.json",
"yarn.lock",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
],
"npm": {
"token": "NPM_TOKEN"
}
}
16 changes: 0 additions & 16 deletions release.config.mjs

This file was deleted.

0 comments on commit 6e26144

Please sign in to comment.