Skip to content

Commit

Permalink
Merge pull request #682 from molpopgen/update_actions_for_releases
Browse files Browse the repository at this point in the history
Attempts at fixing various workflow actions
  • Loading branch information
molpopgen committed Mar 2, 2021
2 parents 304d5f2 + 2ca67e6 commit 61167ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- 'main'
release:
types: [published]
types: [created]

jobs:
docker:
Expand All @@ -31,7 +31,7 @@ jobs:
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
-
name: Build and push stable release
if: ${{ github.event_name == 'release' && startsWith(github.event.ref, 'refs/tags') }}
if: github.event_name == 'release'
id: docker_build_release
uses: docker/build-push-action@v2
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
push:
branches: [main]
release:
types: [created]

jobs:
builddocs:
Expand Down Expand Up @@ -81,13 +83,13 @@ jobs:
make
- name: Move built HTML docs
if: github.ref == 'refs/heads/main'
if: github.event_name == 'release'
working-directory: doc
run: |
mv _build/html ../docs_output
- name: Upload artifacts
if: github.ref == 'refs/heads/main'
if: github.event_name == 'release'
uses: actions/upload-artifact@v1
with:
name: docs_output
Expand All @@ -96,7 +98,7 @@ jobs:
deploy:
name: deploy
needs: builddocs
if: github.ref == 'refs/heads/main'
if: github.event_name == 'release'
runs-on: ubuntu-20.04
defaults:
run:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: Build and test wheels
name: Build, test, and deploy, wheels

on:
push:
branches:
- main
- wheeltest
tags:
- '*'
release:
types: [published]
types: [created]

jobs:
macOS:
Expand Down Expand Up @@ -143,7 +137,7 @@ jobs:
mkdir dist
cp */*.{whl,gz} dist/.
- name: Publish distribution to PRODUCTION PyPI
if: github.event_name == 'release' && startsWith(github.event.ref, 'refs/tags')
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_UPLOAD }}

0 comments on commit 61167ee

Please sign in to comment.