v0.4.8 #18
Workflow file for this run
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: Update upm branch on release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build and commit to upm branch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout release | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Fetch branch | |
run: git fetch origin upm:upm || true | |
- name: Create upm branch if it does not yet exist | |
run: git branch upm || true | |
- name: Move to upm branch without changing working copy P0 | |
run: git checkout --detach | |
- name: Move to upm branch without changing working copy P1 | |
run: git reset --soft upm | |
- name: Move to upm branch without changing working copy P2 | |
run: git checkout upm | |
- name: Create upm package | |
run: | | |
git rm -rf Documentation | |
git rm -rf Node | |
git rm -rf Web | |
git rm -rf .github | |
git rm -f README.md | |
git rm -f LICENSE.txt | |
git mv Unity/Assets/* . | |
git rm -rf Unity | |
git rm -rf Local | |
git rm -f Local.meta | |
git rm -f Readme.md | |
git rm -f Readme.md.meta | |
git mv Samples Samples~ | |
git rm -f Samples.meta | |
git rm -f .gitignore | |
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\// /g' -e 's/^/ /' | |
- name: Config user name | |
run: git config --global user.name "github-actions[bot]" | |
- name: Config user email | |
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Add | |
run: git add * | |
- name: Commit | |
run: git commit -m "Add upm package for ${GITHUB_REF#refs/*/}" | |
- name: Tag | |
run: git tag -a ${GITHUB_REF#refs/*/}-upm -m "" | |
- name: Push | |
run: git push --follow-tags --set-upstream origin upm |