diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2023-11-15 23:01:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 23:01:43 +0100 |
commit | 1c73db8eb4c9c12b740de7c580b451f6561abc42 (patch) | |
tree | 3ded5db12a8743c994d01a2beea7baf84ec26e40 | |
parent | 90997893cc568c86805afa95db28439c28e32980 (diff) | |
download | luasystem-1c73db8eb4c9c12b740de7c580b451f6561abc42.zip |
chore(ci): add deployment job (#9)
-rw-r--r-- | .github/workflows/deploy.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cd31c47 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy + +on: [ push, workflow_dispatch ] + +jobs: + + affected: + uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main + + build: + needs: affected + if: ${{ needs.affected.outputs.rockspecs }} + uses: lunarmodules/.github/.github/workflows/test_build_rock.yml@main + with: + rockspecs: ${{ needs.affected.outputs.rockspecs }} + + upload: + needs: [ affected, build ] + # Only run upload if: + # 1. We are on the canonical repository (no uploads from forks) + # 2. The current commit is either tagged or on the default branch (the workflow will upload dev/scm rockspecs any + # time they are touched, tagged ones whenever the edited rockspec and tag match) + # 3. Some rockspecs were changed — this implies the commit changing the rockspec is the same one that gets tagged + if: >- + ${{ + github.repository == 'lunarmodules/luasystem' && + ( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) && + needs.affected.outputs.rockspecs + }} + uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main + with: + rockspecs: ${{ needs.affected.outputs.rockspecs }} + secrets: + apikey: ${{ secrets.LUAROCKS_APIKEY }} |