Skip to content

Create release

Create release #24

name: Create release
on:
workflow_dispatch:
inputs:
version:
type: text
description: 'Version number Eg: 4.2.0'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
scope: '@neutralinojs'
- name: Configure
run: |
npm ci
- name: Create Release Notes
run: |
chmod +x ./scripts/rz.py
./scripts/rz.py create ${{github.event.inputs.version}}
- name: Commit and Push Changelog
uses: EndBug/[email protected]
with:
default_author: github_actions
message: 'Update changelog for v${{github.event.inputs.version}}'
add: 'CHANGELOG.md'
tag: v${{github.event.inputs.version}}
- name: Create Branch
uses: peterjgrainger/[email protected]
with:
branch: v${{github.event.inputs.version}}
env:
GITHUB_TOKEN: ${{ secrets.COMMIT_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: v${{github.event.inputs.version}}
name: Neutralinojs CLI v${{github.event.inputs.version}} released!
bodyFile: ./.tmprz/release_notes.md
- name: Publish to NPM Registry
run: |
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Clean Release Notes
run: |
./scripts/rz.py cleanup
- name: Send Discord Notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: |
Neutralinojs CLI v${{github.event.inputs.version}} released 🚀
Changelog: https://github.com/neutralinojs/neutralinojs-cli/releases/tag/v${{github.event.inputs.version}}