diff options
Diffstat (limited to '.github/workflows/deploy.yml')
-rw-r--r-- | .github/workflows/deploy.yml | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cd31c47..19192f5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml | |||
@@ -1,11 +1,13 @@ | |||
1 | --- | ||
1 | name: Deploy | 2 | name: Deploy |
2 | 3 | ||
3 | on: [ push, workflow_dispatch ] | 4 | on: [push, workflow_dispatch] |
4 | 5 | ||
5 | jobs: | 6 | jobs: |
6 | 7 | ||
7 | affected: | 8 | affected: |
8 | uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main | 9 | uses: |
10 | lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main | ||
9 | 11 | ||
10 | build: | 12 | build: |
11 | needs: affected | 13 | needs: affected |
@@ -15,16 +17,19 @@ jobs: | |||
15 | rockspecs: ${{ needs.affected.outputs.rockspecs }} | 17 | rockspecs: ${{ needs.affected.outputs.rockspecs }} |
16 | 18 | ||
17 | upload: | 19 | upload: |
18 | needs: [ affected, build ] | 20 | needs: [affected, build] |
19 | # Only run upload if: | 21 | # Only run upload if: |
20 | # 1. We are on the canonical repository (no uploads from forks) | 22 | # 1. We are on the canonical repository (no uploads from forks) |
21 | # 2. The current commit is either tagged or on the default branch (the workflow will upload dev/scm rockspecs any | 23 | # 2. The current commit is either tagged or on the default branch (the |
22 | # time they are touched, tagged ones whenever the edited rockspec and tag match) | 24 | # workflow will upload dev/scm rockspecs any time they are touched, |
23 | # 3. Some rockspecs were changed — this implies the commit changing the rockspec is the same one that gets tagged | 25 | # tagged ones whenever the edited rockspec and tag match) |
26 | # 3. Some rockspecs were changed — this implies the commit changing the | ||
27 | # rockspec is the same one that gets tagged | ||
24 | if: >- | 28 | if: >- |
25 | ${{ | 29 | ${{ |
26 | github.repository == 'lunarmodules/luasystem' && | 30 | github.repository == 'lunarmodules/luasystem' && |
27 | ( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) && | 31 | ( github.ref_name == 'master' || |
32 | startsWith(github.ref, 'refs/tags/') ) && | ||
28 | needs.affected.outputs.rockspecs | 33 | needs.affected.outputs.rockspecs |
29 | }} | 34 | }} |
30 | uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main | 35 | uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main |