-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (75 loc) · 2.42 KB
/
generate-latest-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Test and Release
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
changes:
name: Get Changed Content
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
plugin: ${{ steps.filter.outputs.plugin}}
backend: ${{ steps.filter.outputs.backend }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
plugin:
- 'applications/cls-cad-fusion-plugin/**'
backend:
- 'applications/cls-cad-backend/**'
run-tests:
name: Tests
needs: changes
if: ${{ needs.changes.outputs.backend == 'true' }}
uses: tudo-seal/CLS-CAD/.github/workflows/run-tests.yml@main
secrets: inherit
permissions:
checks: write
pull-requests: write
build-msi:
name: Installer
needs: [changes]
if: ${{ needs.changes.outputs.plugin == 'true' }}
uses: tudo-seal/CLS-CAD/.github/workflows/build-publish-installer.yml@main
secrets: inherit
build-container:
name: Container
needs: [changes, run-tests]
if: ${{ needs.changes.outputs.backend == 'true' }}
uses: tudo-seal/CLS-CAD/.github/workflows/build-publish-container.yml@main
permissions:
contents: read
packages: write
secrets: inherit
pre-release:
permissions: write-all
name: Update Latest Release
needs: [run-tests, build-msi, build-container, changes]
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && needs.changes.outputs.plugin == 'true' }}
runs-on: "ubuntu-latest"
steps:
- name: Checkout repository
uses: actions/checkout@v4
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
- uses: actions/download-artifact@master
with:
name: Fusion Plugin Installer
path: cls-cad-fusion-plugin.msi
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Installer"
files: |
cls-cad-fusion-plugin.msi
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'