Skip to content

Commit

Permalink
Rename and create cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph McKinsey committed Jun 7, 2024
1 parent f58c2f2 commit def0ac4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/cd-cli-extras.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CD - CLI Extras

on:
push:
branches:
- main
tags:
- v*

jobs:
build-wheels:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Set up Python3
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install python3 dependencies
run: |
python -m pip install -U pip install wheel setuptools cffi build
- name: Build cli_extras wheel
run: |
cd helics_cli_extras
python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-dist
path: helics_cli_extras/dist/*

publish-helics:
needs: [build-wheels]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/helics-cli-extras
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Get the built packages
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist

- name: Publish package to TestPyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository-url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1

- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: "dist/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes.

0 comments on commit def0ac4

Please sign in to comment.