upm_tag_prefix: the prefix of the tag for this releaseupm_package_path: directory path of unity package which includingpackage.jsondraft:trueto create a draft (unpublished) release,falseto create a published one. Default:falseprerelease:trueto identify the release as a prerelease.falseto identify the release as a full release. Defaultfalsecreate_unitypackage:trueto create an unitypackage fromupm_package_pathand attach it into releaseunitypackage_name: prefix name of created unity package
For more information on these outputs, see the API Documentation for an example of what these outputs look like
id: The release IDhtml_url: The URL users can navigate to in order to view the release. i.e.https://github.com/octocat/Hello-World/releases/v1.0.0upload_url: The URL for uploading assets to the release, which could be used by GitHub Actions for additional uses, for example the@actions/upload-release-assetGitHub Action
On every push to a tag matching the pattern v*, create a release:
name: Publish UPM Package
on:
push:
branches:
- main
workflow_dispatch:
jobs:
upm-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Release for OpenUPM
id: create_release
uses: quabug/create-upm-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: main
upm_tag_prefix: v
upm_package_path: Packages/com.quabug.one-shot-injection
create_unitypackage: true
unitypackage_name: OneShotThis will create a Release, as well as a release event, which could be handled by a third party service, or by GitHub Actions for additional uses, for example the @actions/upload-release-asset GitHub Action. This uses the GITHUB_TOKEN provided by the virtual environment, so no new token is needed.
The scripts and documentation in this project are released under the MIT License