Skip to content

Release

Release #17

Workflow file for this run

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 lint
npm run test
env:
ALS_CREDS_OAUTH2: ${{ secrets.ALS_CREDS_OAUTH2 }}
ALS_CREDS_STANDARD: ${{ secrets.ALS_CREDS_STANDARD }}
ALS_CREDS_PREMIUM: ${{ secrets.ALS_CREDS_PREMIUM }}
- 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}}