Update meross_client.py #66
Workflow file for this run
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 | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
test: | |
uses: "./.github/workflows/main.yml" | |
publish-package: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Version number | |
run: | | |
export RELEASE_VERSION="${GITHUB_REF#refs/*/}" # Generates output of the 'v0.12.9' format | |
export RELEASE_VERSION="${RELEASE_VERSION:1}" # `:}"` -- remove the 'v' prefix | |
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV | |
echo "Release version: ${RELEASE_VERSION}" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: Build packages | |
run: | | |
pip install build | |
python -m build --outdir dist/ | |
# XXX: Generate legacy names (TODO: fix version check code in the plugin) | |
cd dist && for l in $(ls -1 .); do cp $l $(echo $l | sed -e "s/-${RELEASE_VERSION}/-v${RELEASE_VERSION}/" ); done && cd .. | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/*.whl | |
dist/*.tar.gz | |
dist/*.zip | |
prerelease: ${{ contains(env.RELEASE_VERSION, 'dev') || contains(env.RELEASE_VERSION, 'pre') }} | |
name: ${{env.RELEASE_VERSION}} | |
tag_name: ${{env.RELEASE_VERSION}} | |
- name: Update stable-latest | |
run: | | |
git tag -f stable-latest | |
git push --force origin stable-latest |