From 653155f6290944f6badb3a3ffe5b02ef66c432c8 Mon Sep 17 00:00:00 2001 From: tomvanmele Date: Wed, 7 Feb 2024 16:27:47 +0100 Subject: [PATCH] update workflows --- .github/workflows/build.yml | 20 +++++--------- .github/workflows/docs.yml | 52 ++++------------------------------- .github/workflows/release.yml | 50 ++++++++------------------------- .gitignore | 2 +- 4 files changed, 25 insertions(+), 99 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88ec930ae..b3bed2bfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/compas-actions.build@v1.1.1 + - uses: compas-dev/compas-actions.build@v3 with: - test_lint: true - test_compas: true + invoke_lint: true + invoke_test: true + python: ${{ matrix.python }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f81bbdd99..91261643d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/compas-actions.docs@v1.4.1 - 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/compas-actions.docversions@v1.3.0 - 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d816ee53a..11d8fac0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/compas-actions.build@v1.1.1 - 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/compas-actions.publish@v1.0.0 - with: - token: ${{ secrets.PYPI }} \ No newline at end of file + - uses: compas-dev/compas-actions.publish@v2 + with: + pypi_token: ${{ secrets.PYPI }} + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 302c23c7c..a58f38bba 100644 --- a/.gitignore +++ b/.gitignore @@ -116,4 +116,4 @@ docsource/api/generated .vscode/ .pytest_cache/ -generated \ No newline at end of file +generated