Skip to content

Release Binaries

Release Binaries #46

name: Release Binaries
permissions:
contents: write
on:
workflow_dispatch:
release:
types: [created]
jobs:
upload-assets:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Latest Tag
id: latest-tag
run: |
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
echo $(git describe --tags --abbrev=0)
shell: bash
- uses: taiki-e/upload-rust-binary-action@v1
with:
ref: refs/tags/${{ steps.latest-tag.outputs.tag }}
bin: rocketfetch
token: ${{ secrets.GITHUB_TOKEN }}
archive: $bin-$target-$tag
bump-brew-tap:
needs: upload-assets
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Latest Tag
id: latest-tag
run: |
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
shell: bash
- name: Set SHA
id: shasum
run: |
echo "sha=$(wget -O rocketfetch https://github.com/devanlooches/rocketfetch/releases/download/${{ steps.latest-tag.outputs.tag }}/rocketfetch-x86_64-apple-darwin-${{ steps.latest-tag.outputs.tag }}.tar.gz && shasum -a 256 rocketfetch | awk '{ print $1 }')" >> $GITHUB_OUTPUT
- name: Bump Brew
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
run: |
brew tap devanlooches/rocketfetch && cd $(brew --repo devanlooches/rocketfetch)
brew bump-formula-pr -f --version=$( echo ${{ steps.latest-tag.outputs.tag }} | sed 's/^.//' ) --no-browse --no-audit \
--sha256=${{ steps.shasum.outputs.sha }} \
--url="https://github.com/devanlooches/rocketfetch/releases/download/${{ steps.latest-tag.outputs.tag }}/rocketfetch-x86_64-apple-darwin-${{ steps.latest-tag.outputs.tag }}.tar.gz" \
rocketfetch