Skip to content

Commit 7482f85

Browse files
committed
update workflows
1 parent d232778 commit 7482f85

File tree

4 files changed

+47
-81
lines changed

4 files changed

+47
-81
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,17 @@ on:
99
- main
1010

1111
jobs:
12-
build-package:
12+
build:
1313
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python-version: [3.6, 3.7, 3.8, 3.9]
18+
python: ["3.10", "3.11", "3.12"]
1919

2020
steps:
21-
- uses: actions/checkout@v2
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- uses: compas-dev/[email protected]
21+
- uses: compas-dev/compas-actions.build@v4
2922
with:
30-
test_lint: true
31-
test_compas: true
32-
23+
python: ${{ matrix.python }}
24+
invoke_lint: true
25+
invoke_test: true

.github/workflows/docs.yml

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,9 @@ on:
1111
- main
1212

1313
jobs:
14-
build:
15-
name: build and deploy docs
14+
docs:
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: actions/checkout@v2
19-
20-
- uses: compas-dev/[email protected]
21-
id: docs
22-
with:
23-
dest: deploy
24-
build_to_subfolder: true
25-
26-
- name: Deploy docs
27-
if: success() && steps.docs.outputs.commit_type != 'pull'
28-
uses: crazy-max/ghaction-github-pages@v2
29-
with:
30-
target_branch: gh-pages
31-
build_dir: deploy
32-
keep_history: true
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
36-
outputs:
37-
commit_type: ${{ steps.docs.outputs.commit_type }}
38-
current_version: ${{ steps.docs.outputs.current_version }}
39-
40-
docVersions:
41-
needs: build
42-
if: needs.build.outputs.commit_type == 'tag'
43-
name: update doc versions
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v2
47-
with:
48-
ref: gh-pages
49-
50-
- uses: compas-dev/[email protected]
51-
with:
52-
current_version: ${{ needs.build.outputs.current_version }}
53-
54-
- name: Deploy docs
55-
if: success()
56-
uses: crazy-max/ghaction-github-pages@v2
17+
- uses: compas-dev/compas-actions.docs@v4
5718
with:
58-
target_branch: gh-pages
59-
build_dir: ./
60-
keep_history: false
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-checks.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: verify-pr-checklist
2+
on:
3+
pull_request:
4+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Check Actions
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Changelog check
16+
uses: Zomzog/[email protected]
17+
with:
18+
fileName: CHANGELOG.md
19+
checkNotification: Simple
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
1-
name: Release
1+
name: release
22

33
on:
44
push:
55
tags:
66
- 'v*'
77

88
jobs:
9-
Release:
10-
runs-on: ubuntu-latest
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
python: ['3.9', '3.10', '3.11']
15+
1116
steps:
12-
- uses: actions/checkout@v2
13-
- name: Create Release
14-
id: create_release
15-
uses: actions/create-release@v1
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
- uses: compas-dev/compas-actions.build@v4
1818
with:
19-
tag_name: ${{ github.ref }}
20-
release_name: Release ${{ github.ref }}
21-
draft: false
22-
prerelease: false
23-
19+
python: ${{ matrix.python }}
20+
invoke_lint: true
21+
invoke_test: true
2422

2523
Publish:
26-
needs: Release
24+
needs: build
2725
runs-on: ubuntu-latest
2826
steps:
29-
- uses: actions/checkout@v2
30-
- uses: actions/setup-python@v2
31-
with:
32-
python-version: '3.x'
33-
- uses: compas-dev/[email protected]
34-
with:
35-
token: ${{ secrets.PYPI }}
27+
- uses: compas-dev/compas-actions.publish@v3
28+
with:
29+
pypi_token: ${{ secrets.PYPI }}
30+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)