v1.00 #1
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: Make Release | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
REPOSITORY_NAME: GroundShadow_S | |
TIME_ZONE: Asia/Tokyo | |
# Time zone for the timestamp when releasing. | |
permissions: | |
contents: read | |
jobs: | |
release: | |
name: Create Release | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Pack and compress | |
run: | | |
mkdir pack | |
cp *.anm pack | |
cp *.md pack | |
cp LICENSE pack/LICENSE | |
cd pack | |
zip -r ../aviutl_script_${{ env.REPOSITORY_NAME }}-${{ github.ref_name }}.zip * | |
# rename .zip file for downloading if necessary. | |
- name: Prepare release notes | |
id: release-notes | |
run: | | |
echo "name=${{ github.ref_name }} ($(TZ='${{ env.TIME_ZONE }}' date +'%Y-%m-%d'))" >> $GITHUB_OUTPUT | |
echo "### 更新内容" >> ReleaseNotes.txt | |
phase=0 | |
IFS=$'\n' | |
cat pack/README.md | while read line; do | |
if [[ $phase == 0 ]]; then | |
if [[ $line =~ ^##*[[:space:]]{1,}'改版履歴'[[:space:]]*$ ]]; then phase=1; fi | |
elif [[ $phase == 1 ]]; then | |
if [[ $line =~ ^-[[:space:]] ]]; then phase=2; fi | |
elif [[ $line =~ ^(-|##*)[[:space:]] ]]; then break | |
else | |
echo ${line:2} >> ReleaseNotes.txt | |
fi | |
done | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ steps.release-notes.outputs.name }} | |
files: '*.zip' | |
body_path: ReleaseNotes.txt |