Skip to content

Commit

Permalink
chore: more flexibility on the deployment pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sassman committed Jan 11, 2025
1 parent 9a7e6cb commit a647156
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ on:
description: "Version"
required: true
default: "0.1.0"
do-homebrew:
type: boolean
description: "Publish to Homebrew"
required: false
default: true
do-github-release:
type: boolean
description: "Create a GitHub release"
required: false
default: true

jobs:
# call out to build.yml
Expand Down Expand Up @@ -40,6 +50,7 @@ jobs:
publish-to-brew:
name: post / homebrew
runs-on: macos-latest
if: (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && ${{ github.event.inputs.do-homebrew }})
steps:
- name: Get version from tag
if: github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')
Expand All @@ -61,6 +72,7 @@ jobs:
release:
name: post / github release
runs-on: ubuntu-latest
if: (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch') && ${{ github.event.inputs.do-github-release }})
steps:
- uses: actions/checkout@v4
- name: setup | rust
Expand Down Expand Up @@ -88,7 +100,7 @@ jobs:
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
with:
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
Expand Down

0 comments on commit a647156

Please sign in to comment.