Skip to content

Commit

Permalink
Update actions/checkout to v3.
Browse files Browse the repository at this point in the history
Run release workflow when github releases are published.
Run tests only once when pushed into a PR.
  • Loading branch information
TkTech committed Sep 3, 2023
1 parent 5577bda commit 6d283fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
on:
workflow_dispatch:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
release:
types:
- published

name: Creating release

Expand All @@ -19,7 +18,7 @@ jobs:
name: Creating source release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setting up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
py: ["cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Setting up Python
Expand Down Expand Up @@ -100,7 +99,7 @@ jobs:
needs: [upload_all]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setting up Python
uses: actions/setup-python@v4
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Run tests

on: [push, pull_request, workflow_dispatch]
on:
push:
branches:
- master
pull_request:

jobs:
# Tests that are platform-agnostic.
Expand All @@ -12,7 +16,7 @@ jobs:
with:
python-version: 3.11

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Installing platform dependencies
run: >
Expand Down Expand Up @@ -59,7 +63,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Installing platform dependencies
if: matrix.os == 'ubuntu-latest'
Expand Down

0 comments on commit 6d283fe

Please sign in to comment.