Skip to content

Merge pull request #596 from mcneel/AndyPayne/8.x/Compute-262 #490

Merge pull request #596 from mcneel/AndyPayne/8.x/Compute-262

Merge pull request #596 from mcneel/AndyPayne/8.x/Compute-262 #490

Workflow file for this run

# for a list of available software on the different virtual environments, please see:
# https://github.com/actions/virtual-environments/tree/main/images
name: workflow ci
on: [push, pull_request]
jobs:
#checks if this file has changed
check_workflow:
name: check workflow_ci
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: check changed files
uses: tj-actions/[email protected]
id: changed-files
with:
files: .github/workflows/workflow_ci.yml
#check if src has changed
check_src:
name: check src
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: check changed files
uses: tj-actions/[email protected]
id: changed-files
with:
files: src
build_compute:
name: build compute
runs-on: ubuntu-latest
needs: [check_workflow, check_src]
if: ${{ needs.check_src.outputs.any_changed == 'true' || needs.check_workflow.outputs.any_changed == 'true' }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: revision
id: revision
run: |
echo "::set-output name=revision::${GITHUB_SHA::8}"
- name: revision number
shell: pwsh
run: |
echo ${{ steps.revision.outputs.revision }}
(get-content .\src\compute.geometry\FixedEndpoints.cs).replace('git_sha = null', 'git_sha = "${{ steps.revision.outputs.revision }}"') | set-content .\src\compute.geometry\FixedEndpoints.cs
- name: build
run: dotnet publish src/compute.sln -c Release -p:PublishTrimmed=true --self-contained true -r win-x64
- name: artifacts
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: actions/upload-artifact@v2
with:
path: src/dist
name: rhino.compute