Skip to content

release

release #60

Workflow file for this run

name: continuous release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: false
default: 'pre-release'
repository_dispatch:
types: [release]
jobs:
release-addon:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive
- name: Create Addon Folder Structure
run: |
mkdir -p /tmp/turbo_nerf
cp -R . /tmp/turbo_nerf
- name: Archive Build Result
uses: thedoctor0/[email protected]
with:
directory: '/tmp'
path: 'turbo_nerf'
exclusions: '*/.git*, */.github*'
filename: '/tmp/TurboNeRF-BlenderAddon.zip'
- name: Set Release Tag
# if ${{ github.event.client_payload.tag }} is set then use it, otherwise use the input tag
run: |
echo 'RELEASE_TAG=${{ github.event.client_payload.tag || inputs.tag }}' >> $GITHUB_ENV
- name: Set PyTurboNeRF URL
run: |
if [ -n "${{ github.event.client_payload.release_url }}" ]; then
echo 'PYLIB_URL=${{ github.event.client_payload.release_url }}' >> $GITHUB_ENV
else
echo 'PYLIB_URL=https://github.com/JamesPerlman/TurboNeRF/releases/tag/${{ env.RELEASE_TAG }}' >> $GITHUB_ENV
fi
- name: Generate Release
id: gen-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: '/tmp/TurboNeRF-BlenderAddon.zip'
body: 'Please download [PyTurboNeRF ${{ env.RELEASE_TAG }}](${{ env.PYLIB_URL }}) along with this addon.'
commit: ${{ github.sha }}
makeLatest: true
name: 'TurboNeRF Blender Addon'
prerelease: true
replacesArtifacts: true
tag: ${{ env.RELEASE_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
tag: ${{ env.RELEASE_TAG }}
release_url: ${{ steps.gen-release.outputs.html_url }}
notify-discord:
runs-on: ubuntu-20.04
needs: release-addon
steps:
- name: Dispatch Release Notification
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: 'A new version of the Blender addon is now available. [TurboNeRF-Blender ${{ needs.release-addon.outputs.tag }}](<${{ needs.release-addon.outputs.release_url }}>)'