I created a GitHub release script for Omeka S module development.
For this development, I referenced the GitHub repository usage of Daniel-KM, who has developed numerous Omeka S modules.
Specifically, GitHub repositories are created with the naming convention “Omeka-S-module-{module name}”.
Example: https://github.com/Daniel-KM/Omeka-S-module-EasyInstall
For releases, they are tagged with “{module name}-{version}” and a file named “{module name}-{version}.zip” is attached.
Example: https://github.com/Daniel-KM/Omeka-S-module-EasyInstall/releases/tag/3.3.6
When this zip file is extracted, a folder named “{module name}” is created. This is necessary because Omeka S requires the module folder name to match the module name.
I created the following script to achieve this. It is intended to be run from the root of each repository.
set -e
version=1.0.1 # Example version
name=IiifViewers # Example module name
repository_path=. # Module path (example for running from repository root)
# Create a folder with the module name excluding unnecessary files
rsync -ahv $repository_path $repository_path/$name --exclude '.*' --exclude '*.sh'
# Create the zip file
zip $repository_path/$name-$version.zip -r $repository_path/$name
# Delete the folder
rm -rf $repository_path/$name
# Release
gh release create $version $repository_path/$name-$version.zip -t $name-$version -n "Released version $version."
# Delete the file
rm $repository_path/$name-$version.zip
The gh command needs to be installed.
There may be better approaches, but I hope this is helpful for Omeka S module and theme development.