Skip to content

Commit

Permalink
add release workflow (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjvans authored Dec 15, 2023
1 parent 89711c1 commit e1d9388
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 lint
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}}

0 comments on commit e1d9388

Please sign in to comment.