Skip to content

Update release

Update release #1

Workflow file for this run

name: Ceylon-Build-Python
#on:
# workflow_run:
# workflows: ["Ceylon-Release-Python"]
# types:
# - completed
# branches:
# - main
# - master
# - release
# tags:
# - '*'
on:
push:
branches:
- main
- master
- devops
- release
tags:
- '*'
jobs:
release:
name: Ceylon-Release-Python
runs-on: ubuntu-20.04
# if: >
# github.event.workflow_run.conclusion == 'success' &&
# startsWith(github.event.workflow_run.head_branch, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/github-script@v6
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
for (const artifact of artifacts.data.artifacts) {
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/' + artifact.name + '.zip', Buffer.from(download.data));
}
- name: Unzip artifacts
run: |
for file in *.zip
do
unzip "$file" -d "${file%.zip}"
done
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*