Skip to content

Commit a647156

Browse files
committed
chore: more flexibility on the deployment pipeline
1 parent 9a7e6cb commit a647156

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ on:
1313
description: "Version"
1414
required: true
1515
default: "0.1.0"
16+
do-homebrew:
17+
type: boolean
18+
description: "Publish to Homebrew"
19+
required: false
20+
default: true
21+
do-github-release:
22+
type: boolean
23+
description: "Create a GitHub release"
24+
required: false
25+
default: true
1626

1727
jobs:
1828
# call out to build.yml
@@ -40,6 +50,7 @@ jobs:
4050
publish-to-brew:
4151
name: post / homebrew
4252
runs-on: macos-latest
53+
if: (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && ${{ github.event.inputs.do-homebrew }})
4354
steps:
4455
- name: Get version from tag
4556
if: github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')
@@ -61,6 +72,7 @@ jobs:
6172
release:
6273
name: post / github release
6374
runs-on: ubuntu-latest
75+
if: (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch') && ${{ github.event.inputs.do-github-release }})
6476
steps:
6577
- uses: actions/checkout@v4
6678
- name: setup | rust
@@ -88,7 +100,7 @@ jobs:
88100
id: create_release
89101
uses: actions/create-release@v1
90102
env:
91-
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
103+
GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
92104
with:
93105
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
94106
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps

0 commit comments

Comments
 (0)