Skip to content

Release 11.0.0-rc.2 #117

Release 11.0.0-rc.2

Release 11.0.0-rc.2 #117

Workflow file for this run

name: Release
run-name: Release ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: Version to be released
required: true
commit:
description: Commit to be released
required: false
beta:
type: boolean
description: Flags release as prerelase
required: false
defaults:
run:
shell: bash
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
VERSION: "${{ github.event.inputs.version }}"
BETA: "${{ github.event.inputs.beta }}"
COMMIT: "${{ github.event.inputs.commit }}"
jobs:
test:
name: Tests
environment: staging
runs-on: ubuntu-latest
steps:
- name: Print Input
run: |
echo "VERSION"
echo "${{ env.VERSION }}"
echo "COMMIT"
echo "${{ env.COMMIT }}"
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Install uv
shell: bash
run: |
uv sync --locked
- name: Test
run: |
uv run --frozen pytest
build-ubuntu:
name: Ubuntu Release
environment: staging
runs-on: ubuntu-latest
needs: test
env:
PACKAGE_NAME: "logsmith_linux_${VERSION}.zip"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Install uv
shell: bash
run: |
uv sync --locked
- name: Bundle
run: |
uv run --frozen -m PyInstaller ./logsmith.spec
ls -la ./dist
zip -r "${{ env.PACKAGE_NAME }}" ./dist/logsmith
- name: Release
run: |
if [ "${{ env.COMMIT }}" != "" ]; then
commit=${{ env.COMMIT }}
else
commit=${GITHUB_SHA}
fi
release_type_flag=""
if [ "${{ env.BETA }}" == "true" ]; then
release_type_flag="--prerelease"
else
release_type_flag="--latest"
fi
pip install requests
./ci/release.py ${release_type_flag} \
--repository "${{ github.repository }}" \
--version "${{ env.VERSION }}" \
--commit "${commit}" \
--token "${{ secrets.GITHUB_TOKEN }}" \
--asset "${{ env.PACKAGE_NAME }}"
build-darwin:
name: Darwin Release
environment: staging
runs-on: macos-latest
needs: test
env:
PACKAGE_NAME: "logsmith_darwin_${VERSION}.zip"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Install uv
shell: bash
run: |
uv sync --locked
- name: Bundle
run: |
uv run --frozen -m PyInstaller ./logsmith.spec
ls -la ./dist
zip -r "${{ env.PACKAGE_NAME }}" ./dist/logsmith.app
- name: Release
run: |
if [ "${{ env.COMMIT }}" != "" ]; then
commit=${{ env.COMMIT }}
else
commit=${GITHUB_SHA}
fi
release_type_flag=""
if [ "${{ env.BETA }}" == "true" ]; then
release_type_flag="--prerelease"
else
release_type_flag="--latest"
fi
pip install requests
./ci/release.py ${release_type_flag} \
--repository "${{ github.repository }}" \
--version "${{ env.VERSION }}" \
--commit "${commit}" \
--token "${{ secrets.GITHUB_TOKEN }}" \
--asset "${{ env.PACKAGE_NAME }}"