Skip to content

Merge pull request #13 from BBai-Tips/staging #9

Merge pull request #13 from BBai-Tips/staging

Merge pull request #13 from BBai-Tips/staging #9

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write # This is required to create a release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
with:
deno-version: v1.x
- name: Get version
id: get_version
run: echo "VERSION=$(deno eval 'import { VERSION } from "./version.ts"; console.log(VERSION);')" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: Release v${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
## disabled until homebrew formula has been accepted
# - name: Update Homebrew formula
# run: |
# # Download the archive
# curl -L -o bbai.tar.gz "https://github.com/BBai-Tips/bbai/archive/v${{ steps.get_version.outputs.VERSION }}.tar.gz"
#
# # Calculate SHA256
# SHA256=$(shasum -a 256 bbai.tar.gz | awk '{print $1}')
#
# # Update the Homebrew formula
# sed -i 's/version ".*"/version "${{ steps.get_version.outputs.VERSION }}"/' deployment/homebrew/bbai.rb
# sed -i 's|url ".*"|url "https://github.com/BBai-Tips/bbai/archive/v${{ steps.get_version.outputs.VERSION }}.tar.gz"|' deployment/homebrew/bbai.rb
# sed -i 's/sha256 ".*"/sha256 "'$SHA256'"/' deployment/homebrew/bbai.rb
#
# # Commit and push changes
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git add deployment/homebrew/bbai.rb
# git commit -m "Update Homebrew formula to v${{ steps.get_version.outputs.VERSION }}"
# git push