Skip to content

Merge pull request #4 from sunquakes/development #1

Merge pull request #4 from sunquakes/development

Merge pull request #4 from sunquakes/development #1

Workflow file for this run

name: Create Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Build Library
run: |
yarn install
yarn build
- name: Extract Changelog
id: extract_changelog
run: |
# Set the delimiter
delimiter="---"
# Read the file and extract the first part
while read -r line
do
if [[ $line == "$delimiter" ]]
then
break
fi
echo $line >> release_body.md
done < "CHANGELOG.md"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: release_body.md
draft: false
prerelease: false
- name: Publish to NPM
run: |
yarn config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
yarn publish --no-git-checks --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Install Vuepress and Build Docs
run: |
cd docs
yarn install
yarn docs:build
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs/docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}