caleb531 / open-conference-url

An Alfred workflow to open the Zoom/Meet/etc. URL for your next meeting
MIT License
46 stars 6 forks source link

Automatically build releases #13

Closed birnstiel closed 2 years ago

birnstiel commented 2 years ago

I unpacked the already-built Workflow to have info.plist also unter version control and added a GitHub action that automatically builds the .alfredworkflow and creates a release, once a new version is tagged.

caleb531 commented 2 years ago

@birnstiel Thank you for this idea! I already use a custom tool I wrote called alfred-workflow-packager to export the packaged workflow. But this is an interesting alternative.

A few questions:

  1. How does the version-controlled info.plist get updated if I make changes to the workflow objects in Alfred Preferences?
  2. How does the version of the packaged workflow get updated? Is is set to the tag I just created? (if so, it would need to be without the v prefix)
  3. Does the packaged workflow generated by the Github Action get committed as a second commit because the tagged commit was already created? I would prefer the exported workflow to be part of the same commit that is tagged, hence the reason why I export the workflow (with the desired version) before creating/tagging the release commit
birnstiel commented 2 years ago
  1. I think this would need to be exported from Alfred, then unzipped and replaced with the new info.plist
  2. Yes, the version would be taken from the tag. I haven't tried it without the v
  3. No, the packaged workflow would not be in the repository itself, but it would be part of the release. You can see the result for example in my TTimer workflow: just go to releases and in addition to the repository, it has the workflow ready to be downloaded.

Just an idea, feel free to close if you prefer your already working packager - didn't know about it.

caleb531 commented 2 years ago

@birnstiel Thank you, but yes, I think I would prefer to stick with the system I have. However, if you're interested in building your own custom version of the workflow with my system, here's a rundown of the commands for setting up my alfred-workflow-packager tool:

# Optional; switch to the project directory if you're not already there
cd ./projects/
# Stand up virtualenv for project
pip3 install virtualenv
virtualenv --python=python3 ./.virtualenv
# Activate virtualenv in current directory (run `deactivate` to exit virtualenv context)
source .virtualenv/bin/activate
# Install project dependencies
pip install -r requirements.txt
# Copy any changed repository files to the installed workflow; run this
# whenever you have project scripts or assets that have changed
awp
# When you want to bump the version and re-export the workflow to the repository
awp -v 4.0.0-beta.1 -e

I may add a CONTRIBUTING.md file in the future to contain this info. But for now, what you have above is the basic know-how.

Also, here's a link to my alfred-workflow-packager repository, if you want to learn more about configuring it: https://github.com/caleb531/alfred-workflow-packager