Skip to content

Commit 701e791

Browse files
committed
Update release workflow
1 parent d5babde commit 701e791

File tree

2 files changed

+29
-63
lines changed

2 files changed

+29
-63
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,48 @@
11
name: Release on npm
22

33
on:
4-
push:
5-
branches:
6-
- "main"
7-
paths:
8-
- package.json
4+
workflow_dispatch:
5+
inputs:
6+
release-type:
7+
description: "Release type (major, minor, patch)"
8+
required: true
9+
default: "patch"
10+
type: choice
11+
options:
12+
- major
13+
- minor
14+
- patch
915

1016
permissions:
1117
contents: write
12-
pull-requests: read
1318
id-token: write
1419

1520
jobs:
16-
build_and_publish:
21+
release:
1722
runs-on: ubuntu-latest
1823

1924
steps:
2025
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
2128

22-
- name: Set up Node
29+
- name: Set up Node.js
2330
uses: actions/setup-node@v4
2431
with:
2532
node-version-file: ".nvmrc"
33+
registry-url: "https://registry.npmjs.org"
2634

2735
- name: Install dependencies
28-
run: npm install
29-
30-
- name: Build
31-
run: |
32-
npm run build
33-
34-
- id: publish
35-
name: Publish to NPM
36-
uses: JS-DevTools/npm-publish@v3
37-
with:
38-
token: ${{ secrets.NPM_TOKEN }}
39-
dry-run: false
40-
provenance: true
41-
access: public
42-
43-
- name: Post-publish
44-
if: steps.publish.outputs.type != 'none'
45-
run: |
46-
echo "Published ${{ steps.publish.outputs.type }} version: ${{ steps.publish.outputs.version }}"
36+
run: npm ci
4737

48-
- name: Publish skipped
49-
if: steps.publish.outputs.type == 'none'
38+
- name: Configure Git
5039
run: |
51-
echo "Version in package.json has not changed. Skipping."
52-
exit 0
40+
git config user.name "github-actions[bot]"
41+
git config user.email "github-actions[bot]@users.noreply.github.com"
5342
54-
- name: Configure changelog
55-
if: steps.publish.outputs.type != 'none'
56-
run: |
57-
echo '{"categories": [], "template": "## Commits:\n\n${{ '${{UNCATEGORIZED}}' }}", "pr_template": ${{ '"- ${{MERGE_SHA}} ${{TITLE}}"' }} }' > changelog_config.json
58-
echo "last_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
59-
echo "curr_commit=$(git rev-parse HEAD)" >> $GITHUB_ENV
60-
61-
- name: Generate changelog
62-
if: steps.publish.outputs.type != 'none'
63-
id: github_release
64-
uses: mikepenz/[email protected]
43+
- name: Release
44+
run: npm run release -- ${{ github.event.inputs.release-type }} --ci
6545
env:
6646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
with:
68-
fromTag: "${{ env.last_tag }}"
69-
toTag: ${{ github.ref }}
70-
commitMode: true
71-
configuration: changelog_config.json
72-
73-
- name: Create release
74-
if: steps.publish.outputs.type != 'none'
75-
id: create_release
76-
uses: actions/create-release@v1
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
with:
80-
tag_name: v${{ steps.publish.outputs.version }}
81-
release_name: v${{ steps.publish.outputs.version }}
82-
commitish: ${{ github.ref }}
83-
body: ${{ steps.github_release.outputs.changelog }}
84-
draft: false
85-
prerelease: false
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "@makingchatbots/n8n-nodes-genesys-cloud",
3-
"version": "0.1.3",
3+
"version": "1.0.0",
44
"description": "n8n node for interacting with Genesys Cloud's Platform API",
55
"license": "MIT",
66
"homepage": "https://makingchatbots.com",
77
"keywords": [
88
"n8n-community-node-package",
9-
"genesys-cloud"
9+
"genesys-cloud",
10+
"genesys cloud",
11+
"genesys cloud n8n",
12+
"platform api n8n"
1013
],
1114
"author": {
1215
"name": "Lucas Woodward",

0 commit comments

Comments
 (0)