Skip to content

v3.19.0

v3.19.0 #448

Workflow file for this run

name: release
on:
release:
types: [published]
jobs:
stable-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'main'
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- name: Legacy Release
if: startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/tags/v2')
run: |
yarn changeset publish --tag legacy
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
- name: Latest Release
if: startsWith(github.ref, 'refs/tags/v3')
run: |
yarn changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
- name: Checkout Docs
uses: actions/checkout@v3
with:
repository: SAP/cloud-sdk
token: ${{ secrets.GH_DOCS_TOKEN }}
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
path: ./cloud-sdk
- name: Update release notes
run: |
npx ts-node -e "import { addCurrentChangelog } from './scripts/add-changelog'; addCurrentChangelog()"
- name: Open PR
run: |
cd cloud-sdk
git config --local user.email "${{ secrets.GH_DOCS_EMAIL }}"
git config --local user.name "${{ secrets.GH_DOCS_USER }}"
git checkout -b "update-release-notes"
git commit -m "update release notes" -a
git push -u origin update-release-notes
echo ${{ secrets.GH_DOCS_TOKEN }} | gh auth login --hostname github.com --with-token
gh config set prompt disabled
PR_BODY="Auto-created by update release notes workflow."
PR_TITLE="Update JS Release Notes"
gh pr create --head "update-release-notes" --title "${PR_TITLE}" --body "${PR_BODY}"