Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
nadobando committed Sep 17, 2023
1 parent 12405d0 commit 745799d
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 79 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Build

on:
workflow_run:
workflows: [CI]
types:
- completed
branches: [main]



jobs:
build:
runs-on: ubuntu-latest
concurrency: build
permissions:
id-token: write
contents: write
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.PAT_TOKEN }}


- name: Store the distribution packages
uses: actions/upload-artifact@v3
if: steps.release.outputs.released == 'true'

with:
name: python-package-distributions
path: dist/

# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# if: steps.release.outputs.released == 'true'
## with:
## user: ${{ secrets.PYPI_USER }}
## password: ${{ secrets.PYPI_PASSWORD }}
#name: Build
#
#on:
# workflow_run:
# workflows: [CI]
# types:
# - completed
# branches: [main]
#
#
#
#jobs:
# build:
# runs-on: ubuntu-latest
# concurrency: build
# permissions:
# id-token: write
# contents: write
# if: github.event.workflow_run.conclusion == 'success'
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Publish package distributions to GitHub Releases
# uses: python-semantic-release/upload-to-gh-release@main
# - name: Python Semantic Release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.PAT_TOKEN }}
#
#
# - name: Store the distribution packages
# uses: actions/upload-artifact@v3
# if: steps.release.outputs.released == 'true'
#
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# name: python-package-distributions
# path: dist/
#
## - name: Publish package distributions to PyPI
## uses: pypa/gh-action-pypi-publish@release/v1
## if: steps.release.outputs.released == 'true'
### with:
### user: ${{ secrets.PYPI_USER }}
### password: ${{ secrets.PYPI_PASSWORD }}
##
## - name: Publish package distributions to GitHub Releases
## uses: python-semantic-release/upload-to-gh-release@main
## if: steps.release.outputs.released == 'true'
## with:
## github_token: ${{ secrets.GITHUB_TOKEN }}
47 changes: 46 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:


jobs:
check:
pre-commit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -87,3 +87,48 @@ jobs:
path: coverage.xml
minimum_coverage: 75
fail_below_threshold: true

build:
if: github.ref == 'refs/heads/main'
needs:
- test
runs-on: ubuntu-latest
concurrency: build
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

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


- name: Store the distribution packages
uses: actions/upload-artifact@v3
if: steps.build.outputs.released == 'true'

with:
name: python-package-distributions
path: dist/

outputs:
released: steps.build.outputs.released

release:
if: job.build.outputs.released == 'true'
concurrency: release
needs:
- pre-commit
- build
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
62 changes: 31 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Release

on:
push:
tags:
- "*"
# workflow_run:
# workflows: [ Build ]
# types:
# - completed
#name: Release
#
#on:
# push:
# tags:
# - "*"

permissions:
id-token: write
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/

# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1

# - name: Publish package distributions to GitHub Releases
# uses: python-semantic-release/upload-to-gh-release@main
## workflow_run:
## workflows: [ Build ]
## types:
## - completed
## tags:
## - "*"
#
#permissions:
# id-token: write
# contents: write
#
#jobs:
# publish:
# runs-on: ubuntu-latest
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# name: python-package-distributions
# path: dist/
#
# # - name: Publish package distributions to PyPI
# # uses: pypa/gh-action-pypi-publish@release/v1
#
## - name: Publish package distributions to GitHub Releases
## uses: python-semantic-release/upload-to-gh-release@main
## with:
## github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 745799d

Please sign in to comment.