Bump minor version #45
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: Python package | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# If there isn't a release for this version, create a new one. | |
- uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
makeLatest: true | |
prerelease: false | |
skipIfReleaseExists: true | |
# Build and publish the package to pypi. | |
- name: Build and publish to pypi | |
uses: JRubics/[email protected] | |
with: | |
python_version: "3.10" | |
pypi_token: ${{ secrets.PYPI_TOKEN }} | |
package_directory: "opshin" | |
poetry_install_options: "--without dev" | |
# add executables to the release | |
- name: Install jq | |
uses: dcarbone/[email protected] | |
- name: Trigger executable build | |
run: | | |
curl -L \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/opshin/opshin/releases/latest > datafile.json | |
jq -r '.tag_name' < datafile > tag_name | |
jq -r '.upload_url' < datafile > upload_url | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/opshin/opshin/dispatches \ | |
-d '{"event_type":"trigger_binary_build","client_payload":{"ref":"'"$(cat tag_name)"'","upload_url":"'"$(cat upload_url)"'"}}' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |