Skip to content

Commit

Permalink
Merge pull request #34 from cap-js/github_wf
Browse files Browse the repository at this point in the history
Adding the release workflow and changelog
  • Loading branch information
RamIndia authored Oct 27, 2023
2 parents 4045d06 + 9139ef6 commit c8849cc
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: run tests
run: |
npm i -g @sap/cds-dk
npm i
npm run test
- name: get version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.2.3
- name: parse changelog
id: parse-changelog
uses: schwma/parse-changelog-action@v1.0.0
with:
version: '${{ steps.package-version.outputs.current-version }}'
- name: create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: 'v${{ steps.package-version.outputs.current-version }}'
body: '${{ steps.parse-changelog.outputs.body }}'
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
The format is based on [Keep a Changelog](http://keepachangelog.com/).


## Version 0.1.0

### Added

- Initial release

0 comments on commit c8849cc

Please sign in to comment.