From 787413a581b00adecf9a5afee1e815218f1baba4 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Thu, 28 Oct 2021 15:56:25 +0200 Subject: [PATCH] release-it config --- .github/workflows/release.yml | 23 ++++++++++++----------- .release-it.json | 22 ++++++++++++++++++++++ package.json | 11 +++++++++-- 3 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 .release-it.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f14cf02..80b28f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,19 @@ -name: Node.js Package -on: - release: - types: [created] jobs: - build: + release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v2 with: - node-version: "12.x" - registry-url: "https://registry.npmjs.org" + fetch-depth: 0 + - name: git config + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - run: npm install - - run: npm publish + - run: npm run release env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + deploy: + script: + - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc + - npm run release diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 0000000..1bbf10f --- /dev/null +++ b/.release-it.json @@ -0,0 +1,22 @@ +{ + "npm": { + "publish": false + }, + "git": { + "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://github.com/raw/release-it/release-it/master/templates/changelog-compact.hbs", + "tagName": "${version}", + "commitMessage": "Automated release ${version}", + "requireBranch": "develop", + "requireCleanWorkingDir": false, + "git.requireCommits": true + }, + "github": { + "release": true, + "releaseName": "${version}", + "releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://github.com/raw/release-it/release-it/master/templates/changelog-compact.hbs" + }, + + "hooks": { + "after:bump": "npx auto-changelog --commit-limit false -p" + } +} diff --git a/package.json b/package.json index 32da33e..3551958 100644 --- a/package.json +++ b/package.json @@ -11,5 +11,12 @@ "volto", "plone", "react" - ] -} \ No newline at end of file + ], + "scripts": { + "release": "release-it" + }, + "repository": { + "type": "git", + "url": "git@github.com:codesyntax/volto-listingadvanced-variation" + } +}