diff --git a/.github/README_templates/en.md b/.github/README_templates/en.md index ce37d56..02c9b56 100644 --- a/.github/README_templates/en.md +++ b/.github/README_templates/en.md @@ -284,6 +284,9 @@ Toggles whether messages which are showed frequently show or not. This setting w +#### Additional note +In addition to the avatar download method described here, you can also download avatar files from the "Releases" section on the right side of the repository's top page. A zip file of each avatar is attached to the "Assets" section of each release note. + ## Links diff --git a/.github/README_templates/jp.md b/.github/README_templates/jp.md index 8b1a237..8974735 100644 --- a/.github/README_templates/jp.md +++ b/.github/README_templates/jp.md @@ -282,6 +282,9 @@ Mobが被っているプレイヤーの頭は設定に関わらず、デフォ +#### 追記事項 +ここに書かれてあるアバターのダウンロード方法の他に、レポジトリのトップページの右側にある「Releases」からでもアバターファイルをダウンロードできるようにしました。各リリースノートの「Assets」の項目に各アバターのzipファイルが添付されています。 + ## リンク集 diff --git a/.github/workflows/attach_avatars.yml b/.github/workflows/attach_avatars.yml new file mode 100644 index 0000000..cb08788 --- /dev/null +++ b/.github/workflows/attach_avatars.yml @@ -0,0 +1,20 @@ +name: Attach avatars to release assets + +on: + release: + types: + - released + - prereleased + +jobs: + get_target_branches: + name: Get target branches + uses: ./.github/workflows/get_target_branches.yml + attach_avatar: + name: Attach avatars to release assets + needs: get_target_branches + permissions: + contents: write + uses: Gakuto1112/MyFiguraAvatarPacker/.github/workflows/attach_avatars.yml@main + with: + target_branches: ${{ needs.get_target_branches.outputs.target_branches }} \ No newline at end of file diff --git a/.github/workflows/dispatch_readme.yml b/.github/workflows/dispatch_readme.yml index df3dc00..5f6bd69 100644 --- a/.github/workflows/dispatch_readme.yml +++ b/.github/workflows/dispatch_readme.yml @@ -1,4 +1,4 @@ -name: Dispatch README +name: Dispatch readme on: repository_dispatch: @@ -6,13 +6,17 @@ on: - dispatch_readme jobs: + get_target_branches: + name: Get target branches + uses: ./.github/workflows/get_target_branches.yml generate: - name: Generate README + name: Generate readme + needs: get_target_branches permissions: contents: write strategy: matrix: - target-branch: ${{ fromJSON(vars.TARGET_BRANCHES) }} + target-branch: ${{ fromJSON(needs.get_target_branches.outputs.target_branches) }} uses: Gakuto1112/FiguraAvatarsReadmeTemplate/.github/workflows/generate_my_figura_avatar_readme.yml@main with: branch-name: ${{ matrix.target-branch }} \ No newline at end of file diff --git a/.github/workflows/generate_readme.yml b/.github/workflows/generate_readme.yml index b23067b..03d4f88 100644 --- a/.github/workflows/generate_readme.yml +++ b/.github/workflows/generate_readme.yml @@ -3,10 +3,7 @@ name: Generate README on: push: branches: - - Senko - - Shiro - - Suzu - - Sora + - '[A-Z]*' paths: - .github/README_templates/** - .github/workflows/generate_readme.yml diff --git a/.github/workflows/get_target_branches.yml b/.github/workflows/get_target_branches.yml new file mode 100644 index 0000000..774d402 --- /dev/null +++ b/.github/workflows/get_target_branches.yml @@ -0,0 +1,28 @@ +name: Get target branches + +on: + workflow_call: + outputs: + target_branches: + description: The array of merge target branches + value: ${{ jobs.get_target_branches.outputs.target_branches }} + +jobs: + get_target_branches: + name: Get target branches + runs-on: ubuntu-latest + outputs: + target_branches: ${{ steps.output_target_branches.outputs.target_branches }} + steps: + - name: Checkout + uses: actions/checkout@v4.1.6 + with: + fetch-depth: 0 + - name: Get target branches + run: | + echo '[' > ./branch_list.json + git branch -r | grep ' origin/[A-Z][a-z]' | sed 's/ origin\//"/' | sed -z 's/\r//g; s/\n/", /g' | sed 's/, $//g' >> ./branch_list.json + echo ']' >> ./branch_list.json + - name: Output target branches + id: output_target_branches + run: echo target_branches=$(<./branch_list.json) >> $GITHUB_OUTPUT \ No newline at end of file