Skip to content

Build Worklfow

Build Worklfow #1

Workflow file for this run

name: Build Worklfow
on:
release:
types: [published]
permissions:
contents: write
jobs:
publish:
name: "Build & Publish"
runs-on: ubuntu-latest
environment: build
steps:
- id: checkout
uses: actions/checkout@v3
- name: Create Alfred Workflow
id: create_alfred_workflow
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
set -e
# Alfred adds the version number to the workflow name, so we need to remove the "v" prefix
# Zip up the workflow
version_without_v=$(echo "${VERSION}" | sed 's/^v//')
sed -i "s/1.3.37/${version_without_v}/g" "info.plist"
mkdir -p build
find . -not -path '*/\.git|\.github/*' -exec zip --symlinks "build/alfred-granted-${VERSION}.alfredworkflow" {} +
echo "artifactPath=build/alfred-granted-${VERSION}.alfredworkflow" >> $GITHUB_ENV
- uses: diamondburned/action-upload-release@main
with:
files: ${{ env.artifactPath }}