53
53
runs-on : macos-latest
54
54
if : (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && ${{ github.event.inputs.do-homebrew }})
55
55
steps :
56
+ - uses : actions/create-github-app-token@v1
57
+ id : app-token
58
+ with :
59
+ app-id : 1178949
60
+ private-key : ${{ secrets.PRIVATE_KEY_5422M4N_BOT }}
61
+
62
+ - name : Get GitHub App User ID
63
+ id : get-user-id
64
+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
65
+ env :
66
+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
67
+ - run : |
68
+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
69
+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
70
+
56
71
- name : Get version from tag
57
72
if : github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')
58
73
run : echo RELEASE_VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV
@@ -68,14 +83,28 @@ jobs:
68
83
version : ${{ env.RELEASE_VERSION }}
69
84
70
85
env :
71
- COMMITTER_TOKEN : ${{ secrets.COMMITTER_TOKEN }}
86
+ COMMITTER_TOKEN : ${{ steps.app-token.outputs.token }}
72
87
73
88
release :
74
89
name : post / github release
75
90
needs : [doing-a-build]
76
91
runs-on : ubuntu-latest
77
92
if : (github.event_name == 'push' && contains(github.event.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch') && ${{ github.event.inputs.do-github-release }})
78
93
steps :
94
+ - uses : actions/create-github-app-token@v1
95
+ id : app-token
96
+ with :
97
+ app-id : 1178949
98
+ private-key : ${{ secrets.PRIVATE_KEY_5422M4N_BOT }}
99
+
100
+ - name : Get GitHub App User ID
101
+ id : get-user-id
102
+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
103
+ env :
104
+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
105
+ - run : |
106
+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
107
+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
79
108
- uses : actions/checkout@v4
80
109
- name : setup | rust
81
110
uses : dtolnay/rust-toolchain@stable
@@ -102,7 +131,7 @@ jobs:
102
131
id : create_release
103
132
uses : actions/create-release@v1
104
133
env :
105
- GITHUB_TOKEN : ${{ secrets.COMMITTER_TOKEN }}
134
+ GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
106
135
with :
107
136
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
108
137
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
0 commit comments