docs: update docs #26
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
# Required secrets | |
# UNITY_LICENSE: The contents of Unity license file | |
name: 🔖 Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- preview | |
- main | |
- v*.x | |
tags-ignore: | |
- "**" | |
jobs: | |
release: | |
name: 🔖 Release (${{ github.ref_name }}) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: write | |
outputs: | |
channel: ${{ steps.release.outputs.new_release_channel }} | |
released: ${{ steps.release.outputs.new_release_published }} | |
tag: ${{ steps.release.outputs.new_release_git_tag }} | |
steps: | |
- name: 🚚 Checkout (${{ github.ref_name }}) | |
uses: actions/checkout@v4 | |
- name: 🔖 Run semantic release | |
uses: cycjimmy/semantic-release-action@v3 | |
id: release | |
with: | |
working_directory: Packages/src | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- run: | | |
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY | |
echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY | |
echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY | |
merge-to-develop: | |
name: 🔀 Merge to develop | |
needs: release | |
if: needs.release.outputs.released == 'true' | |
uses: ./.github/workflows/merge.yml | |
with: | |
from: ${{ needs.release.outputs.tag }} | |
to: develop | |
permissions: | |
contents: write | |
merge-to-preview: | |
name: 🔀 Merge to preview | |
needs: release | |
if: needs.release.outputs.released == 'true' && needs.release.outputs.channel == '' | |
uses: ./.github/workflows/merge.yml | |
with: | |
from: ${{ needs.release.outputs.tag }} | |
to: preview | |
permissions: | |
contents: write | |
deploy: | |
name: 🚀 Deploy pages | |
needs: release | |
if: needs.release.outputs.channel == '' | |
uses: ./.github/workflows/deploy.yml | |
secrets: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
permissions: | |
contents: read | |
checks: write | |
pages: write | |
id-token: write |