5.4.0 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org/' | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: | | |
cd ${{ github.workspace }}/projects | |
ng build @onlyoffice/document-editor-angular | |
- name: Publish to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm publish ./dist/onlyoffice/document-editor-angular --access public | |
- name: Get Info | |
run: | | |
cd ${{ github.workspace }}/projects/onlyoffice/document-editor-angular | |
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT | |
id: info | |
- name: Generate Changelog | |
run: | | |
cd ${{ github.workspace }}/projects/onlyoffice/document-editor-angular | |
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
id: create_release | |
with: | |
bodyFile: ${{ github.workspace }}/projects/onlyoffice/document-editor-angular/RELEASE.md | |
tag: v${{ steps.info.outputs.version }} |