Merge pull request #9 from sunquakes/development #9
Workflow file for this run
This file contains 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: 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 | |
always-auth: true | |
- 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: | | |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc | |
yarn publish | |
- 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 }} |