From 461a9511261a8d21bdb9842a7854e2ce32b27229 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Sun, 16 Jan 2022 18:44:22 -0800 Subject: [PATCH] CI --- .github/workflows/CI.yaml | 57 ++++++++++++++++++++++++++++++++++++ .github/workflows/build.yaml | 45 ++++++++-------------------- 2 files changed, 69 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/CI.yaml diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..c8d014c --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,57 @@ +on: + workflow_run: + workflows: "CI" + types: + - completed +permissions: + contents: read + issues: write + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: [3.9] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + ref: refs/remotes/pull/${{pull}}/merge + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/download-artifact@v2 + with: + name: isort.out + + - uses: reviewdog/action-setup@v1 + - name: Run reviewdog + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + reviewdog -name="isort" -f=diff -reporter=github-pr-review isort.out + isort . --diff >isort.diff + - name: upload isort output uses: actions/upload-artifact@v2 - if: runner.os != 'Linux' # linux binary currently has a segfault when running on latest fedora with: name: "${{ format('ComicTagger-{0}', runner.os) }}" - path: dist/*.zip - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - prerelease: "${{ contains(github.ref, '-') }}" # alpha-releases should be 1.3.0-alpha.x full releases should be 1.3.0 - draft: true - files: dist/*.zip - - name: "Publish distribution 📦 to PyPI" - if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: piprelease + path: isort.out