Skip to content

Commit

Permalink
fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed May 12, 2024
1 parent 3ed1bda commit f6b2bfd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 59 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/create-release.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Pipeline

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
pytest_39:
uses: ./.github/workflows/pytest-3.9.yml

pytest_311:
uses: ./.github/workflows/pytest-3.11.yml

release-on-success:
needs: [pytest_39, pytest_311]
if: ${{ github.repository == 'Mips2648/jeedom-daemon-py'}}
runs-on: ubuntu-latest
concurrency: release
permissions:
# id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- id: semantic-release
name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
outputs:
released: ${{ steps.semantic-release.outputs.released }}

publish:
needs: [release-on-success]
if: ${{ needs.release-on-success.outputs.released == 'true' }}
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
26 changes: 1 addition & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,4 @@ jobs:
# - First Change
# - Second Change
draft: false
prerelease: true

publish:
needs: [release-on-success]
if: ${{ github.repository == 'Mips2648/jeedom-daemon-py' && needs.release-on-success.outputs.released == 'true' }}
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
prerelease: true

0 comments on commit f6b2bfd

Please sign in to comment.