Fix tag in release #11
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
name: Release CI | |
on: | |
push: | |
branches: ["release"] | |
env: | |
VERSION: 1.0.8 | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.save_upload_url.outputs.upload_url }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
tag: ${{ env.VERSION }} | |
release_name: Release ${{ env.VERSION }} | |
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 }} | |
permissions: | |
contents: write | |
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 }} | |