結論
name: Release Drafter
on:
push:
branches:
- stage
permissions:
contents: read
jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup bundleVersion
run: |
BUNDLE_VERSION=$(cat Unityのプロジェクト名/ProjectSettings/ProjectSettings.asset | grep bundleVersion: | tr -d "bundleVersion: ")
echo $BUNDLE_VERSION
echo "BUNDLE_VERSION=$BUNDLE_VERSION" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v5
with:
name: ${{ env.BUNDLE_VERSION }}
tag: ${{ env.BUNDLE_VERSION }}
version: ${{ env.BUNDLE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
何をやっているか
steps:
- uses: actions/checkout@v4
プロジェクト情報を得るため、チェックアウトする
- name: setup bundleVersion
run: |
BUNDLE_VERSION=$(cat Unityのプロジェクト名/ProjectSettings/ProjectSettings.asset | grep bundleVersion: | tr -d "bundleVersion: ")
echo $BUNDLE_VERSION
echo "BUNDLE_VERSION=$BUNDLE_VERSION" >> $GITHUB_ENV
ProjectSettingsからbundleVersion
を引っこ抜く
- uses: release-drafter/release-drafter@v5
with:
name: ${{ env.BUNDLE_VERSION }}
tag: ${{ env.BUNDLE_VERSION }}
version: ${{ env.BUNDLE_VERSION }}
release-drafterのAction Inputsを用いて、BUNDLE_VERSIONを流し込む