File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676
7777 - name : Upload release assets
7878 run : gh release upload "${{ github.ref_name }}" createos-* --clobber
79+
80+ update-tap :
81+ needs : release
82+ runs-on : ubuntu-latest
83+ steps :
84+ - uses : actions/checkout@v4
85+ with :
86+ repository : NodeOps-app/homebrew-tap
87+ token : ${{ secrets.TAP_GITHUB_TOKEN }}
88+
89+ - name : Update formula
90+ run : |
91+ VERSION="${{ github.ref_name }}"
92+ VERSION_NUM="${VERSION#v}"
93+
94+ ARM64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-darwin-arm64.sha256")
95+ AMD64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-darwin-amd64.sha256")
96+
97+ sed -i "s/version \".*\"/version \"${VERSION_NUM}\"/" Formula/createos.rb
98+ sed -i "/on_arm/,/end/{s/sha256 \".*\"/sha256 \"${ARM64_SHA}\"/}" Formula/createos.rb
99+ sed -i "/on_intel/,/end/{s/sha256 \".*\"/sha256 \"${AMD64_SHA}\"/}" Formula/createos.rb
100+ sed -i "s|releases/download/v[^/]*/|releases/download/${VERSION}/|g" Formula/createos.rb
101+
102+ git config user.name "github-actions"
103+ git config user.email "github-actions@github.com"
104+ git add Formula/createos.rb
105+ git commit -m "Update createos to ${VERSION}"
106+ git push
You can’t perform that action at this time.
0 commit comments