Skip to content

Commit

Permalink
change workflow names
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-watttime committed Dec 20, 2023
1 parent 2cc97ae commit b4ed053
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push
tags:
- 'v*'
on:
push:
tags:
- 'v*'

jobs:
build:
Expand Down Expand Up @@ -32,13 +33,12 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/<package-name> # Replace <package-name> with your PyPI project name
url: https://pypi.org/p/watttime-python-client
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

Expand Down Expand Up @@ -92,28 +92,4 @@ jobs:
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/<package-name>

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
--repo '${{ github.repository }}'
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application
name: Python tests

on:
push:
Expand All @@ -13,7 +13,7 @@ permissions:
contents: read

jobs:
build:
test:

runs-on: ubuntu-latest

Expand Down

0 comments on commit b4ed053

Please sign in to comment.