v2.21-for-beta49 #27
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: Basic_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: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup aulua | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| tag=$(gh api repos/karoterra/aviutl2-aulua/releases/latest --jq '.tag_name') | |
| archive="aulua-${tag}-windows-x64.zip" | |
| mkdir -p aulua | |
| gh release download -R karoterra/aviutl2-aulua $tag -p $archive -D aulua | |
| unzip aulua/$archive -d aulua | |
| echo `pwd`/aulua > $GITHUB_PATH | |
| - name: Create package | |
| run: | | |
| aulua pack | |
| cp build/package.au2pkg.zip "aviutl2_script_${{ env.REPOSITORY_NAME }}-${{ github.ref_name }}.au2pkg.zip" | |
| - 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 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@v3 | |
| with: | |
| name: ${{ steps.release-notes.outputs.name }} | |
| files: '*.zip' | |
| body_path: ReleaseNotes.txt |