0.1.4 #4
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: Publish | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
update-version-and-changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Update version file | |
run: | | |
cat VERSION | |
echo "VERSION ${{ github.ref_name }}" | |
echo -n "${{ github.ref_name }}" > VERSION | |
- name: Update changelog file | |
run: | | |
echo "CHANGELOG" | |
- name: Commit updated files | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email 'github-actions@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git add VERSION CHANGELOG.md | |
git commit -m "Auto version and changelog update [${{ github.ref_name }}]" | |
git push origin | |
- name: Tag new commit | |
run: | | |
git tag --force ${{ github.ref_name }} | |
git push origin ${{ github.ref_name }} --force | |
update-release-github: | |
needs: update-version-and-changelog | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Update Release description | |
run: | | |
echo "VERSION" | |
echo "CHANGELOG" | |
external-build-workflow: | |
needs: update-version-and-changelog | |
uses: ./.github/workflows/build.yml | |
with: | |
CIBW_SKIP: "pp* cp36-* cp37-*" | |
CIBW_BUILD: "cp*-macosx* cp*-manylinux*" | |
secrets: inherit | |
release-python-package: | |
needs: [external-build-workflow, update-release-github, update-version-and-changelog] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact # if `name: artifact` is omitted, the action will create extra parent dir | |
path: dist | |
# TODO: Trusted publishing | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} |