Skip to content

Bump up version to bundle latest AlfredExtraPane.app #56

Bump up version to bundle latest AlfredExtraPane.app

Bump up version to bundle latest AlfredExtraPane.app #56

Workflow file for this run

name: Build and Release
on: push
jobs:
create-release:
name: Create and name a release
runs-on: macos-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Workflow Version
run: echo "WF_VERSION=$(plutil -extract version xml1 -o - info.plist | sed -n 's/.*<string>\(.*\)<\/string>.*/\1/p')" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.WF_VERSION }}
release_name: ${{ env.WF_VERSION }}
draft: false
prerelease: false
build-and-upload-artifacts:
name: Build Alfred workflow and upload release artifacts
needs: create-release
strategy:
matrix:
os: [macos-12, macos-14] # Intel and Apple Silicon respectively
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Workflow Version
run: echo "WF_VERSION=$(plutil -extract version xml1 -o - info.plist | sed -n 's/.*<string>\(.*\)<\/string>.*/\1/p')" >> $GITHUB_ENV
# If workflow version didn't change, the create-release thing above will fail, saving us unnecessary builds
- name: Download Latest AlfredExtraPane
run: wget https://github.com/mr-pennyworth/alfred-extra-pane/releases/latest/download/AlfredExtraPane.app.zip
- name: Extract AlfredExtraPane
run: unzip AlfredExtraPane.app.zip
- name: Setup python
uses: actions/setup-python@v5
- name: Install libxml2
run: brew install libxml2
- name: Build Workflow
run: python3 mkworkflow.py
- name: Get Workflow Filename
run: echo "WF_FILENAME=$(ls *.alfredworkflow)" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./${{ env.WF_FILENAME }}
asset_name: ${{ env.WF_FILENAME }}
asset_content_type: application/zip