Skip to content

Commit

Permalink
Fix github actions (#133)
Browse files Browse the repository at this point in the history
* Fix github actions

* Fix remove deoply to legacy
  • Loading branch information
heavenshell authored Aug 7, 2023
1 parent 4e3b11d commit 1dd88d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: release

on:
push:
release:
types:
- published
tags:
- ['0.*']

jobs:
publish:
Expand All @@ -20,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: '3.x'
- name: Install pypa/build
run: >-
python3 -m
Expand All @@ -35,13 +34,8 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
if: startsWith(github.ref, "refs/tags")
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 1dd88d3

Please sign in to comment.