Skip to content

bump v1.16.2 (#699) #29

bump v1.16.2 (#699)

bump v1.16.2 (#699) #29

Workflow file for this run

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
get_version:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Retrieve version and Changelog
id: get_version
run: |
echo icloudpd_version=$(cat pyproject.toml | grep version= | cut -d'"' -f 2) >> $GITHUB_OUTPUT
echo 'icloudpd_changelog<<EOF' >> $GITHUB_OUTPUT
scripts/extract_releasenotes CHANGELOG.md >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Log version and Changelog
run: |
echo "icloudpd_version=${{steps.get_version.outputs.icloudpd_version}}"
echo "icloudpd_changelog=${{steps.get_version.outputs.icloudpd_changelog}}"
outputs:
icloudpd_version: ${{steps.get_version.outputs.icloudpd_version}}
icloudpd_changelog: ${{steps.get_version.outputs.icloudpd_changelog}}
build_src:
runs-on: ubuntu-20.04
needs: [get_version]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dev dependencies
run: |
pip install -e .[dev]
- name: Build Python Wheel
run: |
scripts/build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
if-no-files-found: error
path: |
dist/icloud*.whl
build_linux:
runs-on: ubuntu-20.04
needs: [get_version]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dev dependencies
run: |
pip install -e .[dev]
- name: Build Release Executables
run: |
scripts/build_bin_linux ${{needs.get_version.outputs.icloudpd_version}} amd64
- name: Build Python Binary Wheel
run: |
scripts/build_binary_dist_linux ${{needs.get_version.outputs.icloudpd_version}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
if-no-files-found: error
path: |
dist/icloud*
build_macos:
runs-on: macos-11
needs: [get_version]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dev dependencies
run: |
pip install -e .[dev]
- name: Build Release Executables
run: |
scripts/build_bin_macos ${{needs.get_version.outputs.icloudpd_version}} amd64
- name: Build Python Binary Wheel
run: |
scripts/build_binary_dist_macos ${{needs.get_version.outputs.icloudpd_version}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
if-no-files-found: error
path: |
dist/icloud*
build_windows:
runs-on: windows-2019
needs: [get_version]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dev dependencies
run: |
pip install -e .[dev]
- name: Build Release Executables
run: |
scripts/build_bin_windows ${{needs.get_version.outputs.icloudpd_version}} amd64
- name: Build Python Binary Wheel
run: |
scripts/build_binary_dist_windows ${{needs.get_version.outputs.icloudpd_version}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
if-no-files-found: error
path: |
dist/icloud*
build_publish_docker:
runs-on: ubuntu-20.04
needs: [get_version]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Release Docker and Publish
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
push: true
tags: |
icloudpd/icloudpd:latest
icloudpd/icloudpd:${{needs.get_version.outputs.icloudpd_version}}
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: icloudpd/icloudpd
readme-filepath: ./README_DOCKER.md
short-description: ${{ github.event.repository.description }}
build_publish_npm:
runs-on: ubuntu-20.04
needs: [get_version,build_src,build_linux,build_macos,build_windows]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
path: |
dist
- name: Build Package
run: |
scripts/build_npm ${{needs.get_version.outputs.icloudpd_version}}
- name: Publish NPM
run: |
npm publish dist/npm/@icloudpd/linux-x64 --access public
npm publish dist/npm/@icloudpd/win32-x64 --access public
npm publish dist/npm/@icloudpd/darwin-x64 --access public
npm publish dist/npm/@icloudpd/darwin-arm64 --access public
npm publish dist/npm/icloudpd --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish_pypi:
runs-on: ubuntu-20.04
needs: [get_version,build_src,build_linux,build_macos,build_windows]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dev dependencies
run: |
pip install -e .[dev]
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
path: |
dist
- name: Publish PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m twine upload --non-interactive --disable-progress-bar dist/*.whl
release:
needs: [get_version,build_src,build_linux,build_macos,build_windows]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
path: |
dist
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
body: ${{ needs.get_version.outputs.icloudpd_changelog }}