Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Feb 7, 2024
1 parent 9087f60 commit 653155f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 99 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,17 @@ on:
- main

jobs:
build-packages:
Build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
os: [macos-latest, windows-latest, ubuntu-latest]
python: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: compas-dev/[email protected]
- uses: compas-dev/compas-actions.build@v3
with:
test_lint: true
test_compas: true
invoke_lint: true
invoke_test: true
python: ${{ matrix.python }}
52 changes: 5 additions & 47 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,16 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
pull_request:
branches:
- main

jobs:
build:
name: build and deploy docs
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: compas-dev/[email protected]
id: docs
with:
dest: deploy
build_to_subfolder: true

- name: Deploy docs
if: success() && steps.docs.outputs.commit_type != 'pull'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: deploy
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
commit_type: ${{ steps.docs.outputs.commit_type }}
current_version: ${{ steps.docs.outputs.current_version }}

docVersions:
needs: build
if: needs.build.outputs.commit_type == 'tag'
name: update doc versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages

- uses: compas-dev/[email protected]
with:
current_version: ${{ needs.build.outputs.current_version }}

- name: Deploy docs
if: success()
uses: crazy-max/ghaction-github-pages@v2
- uses: compas-dev/compas-actions.docs@v3
with:
target_branch: gh-pages
build_dir: ./
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
doc_url: https://blockresearchgroup.github.io/compas_fd
50 changes: 12 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,25 @@ on:
name: Create Release

jobs:

Build:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
os: [macos-latest, windows-latest, ubuntu-latest]
python: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: compas-dev/compas-actions.build@v3
with:
python-version: ${{ matrix.python-version }}

- uses: compas-dev/[email protected]
with:
test_lint: true
test_compas: true

Release:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
invoke_lint: true
invoke_test: true
python: ${{ matrix.python }}

Publish:
needs: Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: compas-dev/[email protected]
with:
token: ${{ secrets.PYPI }}
- uses: compas-dev/compas-actions.publish@v2
with:
pypi_token: ${{ secrets.PYPI }}
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ docsource/api/generated
.vscode/
.pytest_cache/

generated
generated

0 comments on commit 653155f

Please sign in to comment.