Fixes and improvements for 24408510eff146cce7348a157f31be8632f1e2bc #31
This file contains 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: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
ASSETS_FOLDER: USharpVideoSubtitles | |
UNITYPACKAGE: USharpVideoSubtitles_${{ github.ref_name }}.unitypackage | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: metcalfc/[email protected] | |
id: changelog | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
rm -fr "Assets/${{ env.ASSETS_FOLDER }}/Development" | |
echo "Assets/${{ env.ASSETS_FOLDER }}.meta" > metaList | |
find "Assets/${{ env.ASSETS_FOLDER }}/" -name \*.meta >> metaList | |
echo $GITHUB_REF_NAME > "Assets/${{ env.ASSETS_FOLDER }}/version.txt" | |
sed -i -e "s/(development version)/$GITHUB_REF_NAME/g" "Assets/${{ env.ASSETS_FOLDER }}/Subtitles.prefab" | |
- uses: pCYSl5EDgo/create-unitypackage@v1 | |
with: | |
package-path: ${{ env.UNITYPACKAGE }} | |
include-files: metaList | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
body: ${{ steps.changelog.outputs.changelog }} | |
files: ${{ env.UNITYPACKAGE }} | |
draft: true | |
- uses: actions/upload-artifact@v3 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: ${{ env.UNITYPACKAGE }} | |
path: ${{ env.UNITYPACKAGE }} |