Skip to content

Publish Stable Release: v2.3.2 #6

Publish Stable Release: v2.3.2

Publish Stable Release: v2.3.2 #6

Workflow file for this run

name: Publish Stable Release
run-name: 'Publish Stable Release: ${{ github.ref_name }}'
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
env:
branch: master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.branch }}
- name: Build
run: |
file_name=Ebook-Translator-Calibre-Plugin_${{ github.ref_name }}.zip
git archive --format=zip --output=$file_name ${{ env.branch }}
- name: Changelog
run: |
{
echo 'changelog<<EOF'
pattern='^## v[0-9](\.[0-9]){2}$'
while read line && [[ "$line" != '---' ]]; do
if [[ "$line" =~ $pattern ]]; then
if [[ ! "$line" =~ ${{ github.ref_name }} ]]; then
echo "*[The release notes will be populated soon]*"; break
fi
continue
fi
echo "$line";
done < CHANGELOG.md
echo 'EOF'
} >> "$GITHUB_OUTPUT"
id: changelog
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.changelog.outputs.changelog }}
files: '*.zip'