Skip to content

Merge branch 'master' of github.com:Preliy/chain #5

Merge branch 'master' of github.com:Preliy/chain

Merge branch 'master' of github.com:Preliy/chain #5

Workflow file for this run

name: Release
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Create UPM Branch
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Checking out UPM Branch
git checkout master
git config --global user.name ${{github.actor}}
git config --global user.email [email protected]
git checkout -B upm
- name: Refactor/Hide Samples Folder
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Refactoring Samples
if [[ -d "Samples" ]]; then
git mv Samples Samples~
rm -f Samples.meta
fi
- name: Refactor/Hide Documentation Folder
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Refactoring Documentation
if [[ -d "Documentation" ]]; then
git mv Documentation Documentation~
rm -f Documentation.meta
fi
- name: Refactor/Hide Tests Folder
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Refactoring Documentation
if [[ -d "Tests" ]]; then
git mv Tests Tests~
rm -f Tests.meta
fi
- name: Remove CI Files
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Removing Continuous Integration Files
rm -f ".releaserc.json"
rm -rf ".github"
rm -f ".gitignore"
- name: Push UPM Branch
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Pushing Release to UPM Branch
git commit -am "Release v${{steps.semantic.outputs.new_release_version}}"
git push -f -u origin upm
- name: Tag UPM Branch
if: steps.semantic.outputs.new_release_published == 'true'
run: |
git tag -f upm/v${{ steps.semantic.outputs.new_release_version }} upm
git push -f origin --tags
- name: Publish Release
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Creating Repo Release
gh release create upm/v${{steps.semantic.outputs.new_release_version}} -t "Release ${{steps.semantic.outputs.new_release_version}}" -F CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}