-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 🎡 go back to python-semantic-release (sigh)
- Loading branch information
Showing
5 changed files
with
67 additions
and
7,000 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,9 @@ jobs: | |
concurrency: release | ||
if: github.repository == 'darvid/python-hyperscan' | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
id-token: write | ||
pull-requests: write | ||
contents: write | ||
env: | ||
RELEASE_PR_BRANCH: create-pull-request/patch | ||
steps: | ||
|
@@ -31,34 +30,61 @@ jobs: | |
|
||
- uses: chainguard-dev/actions/setup-gitsign@main | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Check if release needed | ||
id: release | ||
uses: python-semantic-release/[email protected] | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Install semantic-release dependencies | ||
run: npm clean-install | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-vv --noop" | ||
# python-semantic-release displays what it would have | ||
# committed if commit is true and noop is set | ||
commit: "true" | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
if: github.event_name == 'workflow_dispatch' | ||
if: github.event_name == 'workflow_dispatch' || steps.release.outputs.released == 'true' | ||
|
||
- name: Prepare dist | ||
if: github.event_name == 'workflow_dispatch' | ||
if: github.event_name == 'workflow_dispatch' || steps.release.outputs.released == 'true' | ||
run: | | ||
mkdir dist | ||
mv --backup=numbered ./wheel-*/*.whl -t dist/ | ||
mv --backup=numbered ./sdist/*.tar.gz -t dist/ | ||
ls -ahl dist/ | ||
rm -rf dist/*~ | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- name: Create release branch | ||
if: steps.release.outputs.released == 'true' | ||
run: | | ||
# use the same default branch name that create-pull-request uses | ||
git checkout -b ${RELEASE_PR_BRANCH} | ||
git branch --set-upstream-to=${RELEASE_PR_BRANCH} | ||
- name: Semantic release | ||
uses: python-semantic-release/[email protected] | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-vv" | ||
|
||
- name: Create PR | ||
uses: peter-evans/[email protected] | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
python-version: 3.12 | ||
base: main | ||
assignees: ${{ github.repository_owner }} | ||
title: "Release ${{ steps.release.outputs.version }}" | ||
|
||
- name: Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: npx semantic-release | ||
- name: Publish package distributions to GitHub Releases | ||
if: github.event_name == 'workflow_dispatch' || steps.release.outputs.released == 'true' | ||
uses: python-semantic-release/upload-to-gh-release@main | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.release.outputs.tag }} | ||
|
||
- name: Publish package distributions to PyPI | ||
if: github.event_name == 'workflow_dispatch' || steps.release.outputs.released == 'true' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true | ||
verbose: true |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.