Skip to content

Commit

Permalink
Build and release Workflow (cap-js#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhprasad-sap authored Mar 8, 2024
1 parent 2bdc9d1 commit fea5fdb
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 15 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g @sap/cds-dk
- run: npm i
- run: cds v
- run: npm run test
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: 20
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/[email protected]
- name: parse changelog
id: parse-changelog
uses: schwma/[email protected]
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}}
15 changes: 0 additions & 15 deletions .github/workflows/reuse.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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.0.1 - tbd

### Added

- Initial release

0 comments on commit fea5fdb

Please sign in to comment.