Bump version 0.4.2 -> 0.4.3 (#446) #62
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: Make requirements files | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "pyproject.toml" | |
jobs: | |
make-requirements: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up PDM | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: "3.10" | |
version: 2.18.1 | |
- name: | |
shell: bash | |
run: | | |
case "${{ matrix.os }}" in | |
"ubuntu-latest") | |
export PLATFORM="linux" | |
;; | |
"macOS-latest") | |
export PLATFORM="macos" | |
;; | |
"windows-latest") | |
export PLATFORM="windows" | |
;; | |
esac | |
rm -r requirements/* | |
make sync-reqs-files | |
- name: Get platform variable | |
id: platform | |
shell: bash | |
run: | | |
case "${{ matrix.os }}" in | |
"ubuntu-latest") | |
echo "::set-output name=platform::linux" | |
;; | |
"macOS-latest") | |
echo "::set-output name=platform::macos" | |
;; | |
"windows-latest") | |
echo "::set-output name=platform::windows" | |
;; | |
esac | |
- name: Upload pdm.lock and requirements files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.platform.outputs.platform }}-requirements | |
path: requirements/${{ steps.platform.outputs.platform }} | |
open-PR: | |
needs: [make-requirements] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download linux pdm.lock and requirements files | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux-requirements | |
path: requirements/linux | |
- name: Download windows pdm.lock and requirements files | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-requirements | |
path: requirements/windows | |
- name: Download macOS pdm.lock and requirements files | |
uses: actions/download-artifact@v3 | |
with: | |
name: macos-requirements | |
path: requirements/macos | |
- name: Clean-up CRLF | |
shell: bash | |
run: find requirements -type f -exec sed -i 's/\r//g' {} \; | |
- name: Get timestamp | |
id: timestamp | |
run: echo "::set-output name=timestamp::$(date +'%Y-%m-%d_%H-%M')" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
base: main | |
title: admin/requirements-update_${{ steps.timestamp.outputs.timestamp }} | |
body: Updating lock files and requirements | |
branch: admin/requirements-update_${{ steps.timestamp.outputs.timestamp }} | |
commit-message: Updating lock files and requirements | |
delete-branch: true |