forked from chevdor/tera-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea8bf16
commit cd39d1e
Showing
1 changed file
with
12 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,11 @@ jobs: | |
run: | | ||
sha256="$(cut -d' ' -f1 ${{ steps.upload-binary.outputs.sha256 }})" | ||
echo "sha256_${{ matrix.target }}=$sha256" >> $GITHUB_OUTPUT | ||
- name: Upload artifact for x86_64 linux | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: x86_64_linux | ||
path: ${{ steps.upload-binary.outputs.archive }}.tar.gz | ||
|
||
update-homebrew: | ||
needs: ["publish-binaries"] | ||
|
@@ -168,44 +173,15 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download debian package | ||
- name: Download binary | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: linux | ||
path: ${{ env.DEBIAN_PACKAGE_PATH }} | ||
name: x86_64_linux | ||
path: tera-cli.tar.gz | ||
|
||
- name: ls | ||
run: ls -l | ||
- name: Install tera-cli | ||
run: | | ||
sudo dpkg -i "$DEBIAN_PACKAGE_PATH" | ||
- run: ls | ||
|
||
- name: Output Release Version for Formula templates | ||
id: output-release-version | ||
run: | | ||
echo GITHUB_REF=$GITHUB_REF | ||
RELEASE_VERSION=${GITHUB_REF#refs/*/} | ||
RAW_VERSION=${RELEASE_VERSION:1} | ||
echo "RAW_VERSION=$RAW_VERSION" >> $GITHUB_OUTPUT | ||
# We do that before hecking out master (in case we were not in master already) | ||
- name: Prepare new Formula | ||
env: | ||
NAME: Tera | ||
DESCRIPTION: "A command line utility written in Rust to render templates using the tera templating engine" | ||
SITE: https://github.com | ||
REPO: chevdor/tera-cli | ||
X86_64_SHA256: ${{ needs.publish-binaries.outputs.sha256_macos_x86_64 }} | ||
AARCH64_SHA256: ${{ needs.publish-binaries.outputs.sha256_macos_aarch64 }} | ||
VERSION: ${{ steps.output-release-version.outputs.RAW_VERSION }} | ||
run: | | ||
tera --version | ||
tera --template templates/formula.rb --env-only > $HOME/tera.rb | ||
cat $HOME/tera.rb | ||
- name: Update Homebrew Formula | ||
- name: Install tera-cli | ||
run: | | ||
cp -f $HOME/tera.rb Formula/tera.rb | ||
git config --global user.name 'TeraBot' | ||
git config --global user.email '[email protected]' | ||
git commit Formula/tera.rb -m "build: new homebrew formula for ${{ env.RELEASE_VERSION }}" | ||
tar xf tera-cli.tar.gz | ||
ls -l |