Skip to content

Merge pull request #6 from naddeoa/recipe-fix #6

Merge pull request #6 from naddeoa/recipe-fix

Merge pull request #6 from naddeoa/recipe-fix #6

Workflow file for this run

name: Release CI
on:
push:
branches: ["release"]
env:
VERSION: 1.0.5
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.save_upload_url.outputs.upload_url }}
steps:
- uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false
body: |
Install with pip:
```
pip install booty-cli
```
Or download a binary below
- name: Save upload url
shell: bash
id: save_upload_url
run: |
URL=${{ steps.create_release.outputs.upload_url }}
echo "Setting output to $URL"
echo "upload_url=$URL" >> "$GITHUB_OUTPUT"
assets:
name: Asset upload
needs: [release]
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
variant: linux
BINARY_NAME: booty_linux_x86_64
BUILD_BINARY_COMMAND: "make build-binary-linux"
- os: macos-12 # Set to 12 to make sure it stays an x86 host. Future mac seems to be arm.
variant: mac_x86_64
BINARY_NAME: booty_mac_x86_64
BUILD_BINARY_COMMAND: "make build-binary-mac"
- os: macos-latest
variant: mac_universal
BINARY_NAME: booty_mac_universal
BUILD_BINARY_COMMAND: "make build-binary-mac-universal"
# This isn't supported in free accounts
# - os: macos-13-xlarge
# variant: mac_arm64
# BINARY_NAME: booty_mac_arm64
# BUILD_BINARY_COMMAND: "make build-binary-mac-arm"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11.6"
- uses: Gr1N/setup-poetry@v8
name: Install poetry
with:
poetry-version: 1.7.1
- name: Install python dependencies
run: poetry install
- name: Generate wheels
run: make build
- name: Generate exe
run: |
${{ matrix.BUILD_BINARY_COMMAND }}
chmod +x ./dist/${{ matrix.BINARY_NAME }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/${{ matrix.BINARY_NAME }}
asset_name: ${{ matrix.BINARY_NAME }}
asset_content_type: application/octet-stream
- name: PyPi Publish
if: matrix.os == 'ubuntu-latest'
shell: bash
run: poetry publish -u __token__ -p ${{ secrets.PYPI_KEY }}