Skip to content

Commit

Permalink
Removed abandonded release CI, some minor other release tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed May 14, 2024
1 parent 8781094 commit 33f900c
Showing 1 changed file with 37 additions and 44 deletions.
81 changes: 37 additions & 44 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,46 @@ jobs:
name: ${{ matrix.os }}.tar.gz
path: "*.tar.gz"
if-no-files-found: error

create-github-and-pypi-release:
name: Create a new github and pypi release
runs-on: ubuntu-latest
needs: [build-release]
environment: CI
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
shell: bash
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes *.tar.gz
- name: Place all python wheels into dir for publish to pypi
run: |
mkdir for_pypi
tar xvf *-darwin-apple-m1-python.tar.gz -C for_pypi/ --wildcards "*.whl"
tar xvf *-darwin-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
tar xvf *-linux-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: for_pypi/
password: ${{ secrets.PYPI_API_TOKEN }}

create-rust-release:
name: Publish to crates.io
runs-on: ubuntu-latest
needs: [build-release]
needs: [create-github-and-pypi-release]
environment: CI
steps:
- name: Checkout sources
Expand Down Expand Up @@ -185,46 +220,4 @@ jobs:
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
args: --no-verify

create-github-and-pypi-release:
name: Create a new github and pypi release
runs-on: ubuntu-latest
needs: [create-rust-release]
environment: CI
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ubuntu-latest.tar.gz

- name: Download MacOS arm64 artifact
uses: actions/download-artifact@v4
with:
name: macOS-14.tar.gz

- name: Download MacOS x86_64 artifact
uses: actions/download-artifact@v4
with:
name: macOS-latest.tar.gz

- name: Provide new release asset
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.tar.gz
- name: Place all python wheels into dir for publish to pypi
run: |
mkdir for_pypi
tar xvf *-darwin-apple-m1-python.tar.gz -C for_pypi/ --wildcards "*.whl"
tar xvf *-darwin-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
tar xvf *-linux-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: for_pypi/
password: ${{ secrets.PYPI_API_TOKEN }}
args: --no-verify

0 comments on commit 33f900c

Please sign in to comment.