Skip to content

Commit

Permalink
Merge pull request #9 from Chia-Network/develop
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
TheLastCicada authored Sep 22, 2023
2 parents 7208194 + a1a67cf commit 2a83a7d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 39 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compares the version in package.json to tags on the repo. If the tag doesn't exist, a new tag is created, which
# then triggers the normal "on tag" release automation in the build job
name: Auto Tag
name: Tag, Release, and Publish to NPM

on:
push:
Expand All @@ -11,7 +11,7 @@ concurrency:
group: main-release-check

jobs:
tag-and-changelog:
tag-release-publish:
name: Changelog and Tag
runs-on: ubuntu-latest
steps:
Expand All @@ -25,13 +25,21 @@ jobs:
token: ${{ secrets.PACKAGE_ADMIN_PAT }}
fetch-depth: 0

- name: Setup Node 18.x
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Configure commit signing for ChiaAutomation
uses: Chia-Network/actions/commit-sign/gpg@main
with:
gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }}
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }}

- name: Check for current version tag. Create if it doesn't exist
- name: Create tag, create release, publish to npm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
version=$(cat $GITHUB_WORKSPACE/package.json | jq -r '.version')
echo "Version is: $version"
Expand All @@ -48,4 +56,11 @@ jobs:
git tag $version -m "Release $version $changes"
git push origin $version
git push origin main
gh release create --verify-tag --notes-from-tag $version
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
fi
- name: Cleanup
if: always()
run: rm .npmrc || true
31 changes: 0 additions & 31 deletions .github/workflows/publish-npm.yml

This file was deleted.

8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Logger {
addColors(customLevels.colors);

const chiaRoot = getChiaRoot();
const logDir = `${chiaRoot}/core-registry/logs/${projectName}`;
const logDir = `${chiaRoot}/core-registry/logs`;

if (!fs.existsSync(logDir)) {
fs.mkdirSync(logDir, { recursive: true });
Expand Down Expand Up @@ -71,16 +71,16 @@ class Logger {
),
transports: [
new transports.File({
filename: `${logDir}/error.log`,
filename: `${logDir}/${projectName}-error.log`,
level: "error",
format: sharedFileFormat,
}),
new transports.File({
filename: `${logDir}/combined.log`,
filename: `${logDir}/${projectName}-combined.log`,
format: sharedFileFormat,
}),
new DailyRotateFile({
filename: `${logDir}/application-%DATE%.log`,
filename: `${logDir}/${projectName}-application-%DATE%.log`,
datePattern: "YYYY-MM-DD",
zippedArchive: true,
maxSize: "20m",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chia-carbon/core-registry-logger",
"version": "1.0.1",
"version": "1.0.2",
"description": "Custom logger for core registry projects",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2a83a7d

Please sign in to comment.