Skip to content

0.2.1

0.2.1 #2

Workflow file for this run

name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Generate Release Notes
id: generate_notes
run: |
# Get the latest tag
LATEST_TAG=$(git describe --tags --abbrev=0)
# Get the previous tag
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || git rev-list --max-parents=0 HEAD)
# Generate changelog
if [ "$PREVIOUS_TAG" = "$(git rev-list --max-parents=0 HEAD)" ]; then
CHANGELOG=$(git log --pretty=format:"- %s" $PREVIOUS_TAG..$LATEST_TAG)
else
CHANGELOG=$(git log --pretty=format:"- %s" $PREVIOUS_TAG..$LATEST_TAG)
fi
# Save changelog to file
echo "$CHANGELOG" > changelog.md
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: changelog.md
draft: true
files: |
build/main.js
build/manifest.json
build/styles.css
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}