Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,31 @@ jobs:
# chmod +x ./codexctl
# ./codexctl download --hardware rm2 --out /tmp toltec
release:
name: Release
name: ${{ github.ref == 'refs/heads/main' && 'Release' || 'Test release' }}
needs:
- remote
- device
#- test_device
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
Comment thread
Eeems marked this conversation as resolved.
- name: Set current date as env variable
run: |
echo "NAME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "TAG=$(date +%s)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Check out repository
uses: actions/checkout@v4
Comment thread
Eeems marked this conversation as resolved.
- name: Install Poetry
run: |
sudo apt-get update
sudo apt-get install -y libfuse-dev pkg-config
curl -sSL https://install.python-poetry.org | python3 -
Comment thread
coderabbitai[bot] marked this conversation as resolved.
echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/download-artifact@v4
with:
path: artifacts
Expand All @@ -257,10 +268,31 @@ jobs:
popd
done
- uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/main'
with:
artifacts: "artifacts/*.zip"
name: ${{ env.NAME }}
tag: ${{ env.TAG }}
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true
- name: Update version
run: sed -i -E "s/^version = \"(.*)\"$/version = \"\1.post$tag\"/" pyproject.toml
env:
tag: ${{ env.TAG }}
- name: Install dependencies
run: poetry install --no-interaction
- name: Build package
run: poetry build
- name: Publish to pypi
if: github.ref == 'refs/heads/main'
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
- name: Test output
if: github.ref != 'refs/heads/main'
run: |
echo "name: ${{ env.NAME }}"
echo "tag: ${{ env.TAG }}"
echo "commit: ${{ github.sha }}"
echo "version: $(grep '^version = ' pyproject.toml | cut -d= -f2 | jq -r)"
34 changes: 0 additions & 34 deletions .github/workflows/python-publish.yml

This file was deleted.

Loading