fix(ci): changed semantic-release-action version #64
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: ⚙ Build and Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: ⚙ Release | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_NAME: extOSC | |
PROJECT_ASSETS: README.md:CHANGELOG.md:LICENSE | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: master | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
- name: Push UPM update | |
run: | | |
IFS=: read -r -a PROJECT_ASSETS_ARRAY <<< "$PROJECT_ASSETS" | |
mkdir Temp | |
for asset in "${PROJECT_ASSETS_ARRAY[@]}"; do | |
cp ${asset} Temp/${asset} | |
done | |
git log -1 | |
git subtree split -P "Assets/$PROJECT_NAME" -b upm | |
git checkout upm | |
for asset in "${PROJECT_ASSETS_ARRAY[@]}"; do | |
cp Temp/${asset} ${asset} | |
git add ${asset} | |
done | |
if [[ -d "Examples" ]]; then | |
git mv Examples Examples~ | |
rm -f Examples.meta | |
fi | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git commit -am "chore(release): update upm branch [skip ci]" | |
git push -f -u origin upm | |
- name: Push UPM tag | |
if: steps.semantic.outputs.new_release_published == 'true' | |
env: | |
UPM_TAG: upm/v${{ steps.semantic.outputs.new_release_version }} | |
run: | | |
git tag $UPM_TAG upm | |
git push origin --tags | |