Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for repository_dispatch with payload #697

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ jobs:
id: version
run: echo "::set-output name=version::$(make oplversion)"

- name: Get parent trigger
if: ${{ github.event_name }} == 'repository_dispatch'
id: parent
run: echo "::set-output name=parent::$(echo -${{ github.event.client_payload.parent }}@${{ github.event.client_payload.parent_sha }} | sed 's/\//,/g')"

- name: Download all artifacts
uses: actions/download-artifact@v3

Expand Down Expand Up @@ -207,6 +212,17 @@ jobs:
OPNPS2LD-VARIANTS.7z
OPNPS2LD-LANGS.7z

- name: update release
if: github.ref == 'refs/heads/master' && '${{ github.event_name }}' == 'repository_dispatch'
id: update_release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
TAG_NAME: "latest"
with:
body: "Package was released again because of a toolchain update: ${{ github.event.client_payload.parent }}@${{ github.event.client_payload.parent_sha }}"
is_append_body: true

- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
Expand All @@ -226,10 +242,10 @@ jobs:
if: github.ref == 'refs/heads/master' && env.USERNAME != null
uses: Difegue/action-megacmd@master
with:
args: put -c OPNPS2LD.7z /OPL/Pre-Release/${{ steps.version.outputs.version }}/
args: put -c OPNPS2LD.7z /OPL/Pre-Release/${{ steps.version.outputs.version }}${{ steps.parent.outputs.parent }}/

- name: Upload release to Mega
if: startsWith(github.ref, 'refs/tags/v') && env.USERNAME != null
uses: Difegue/action-megacmd@master
with:
args: put -c OPNPS2LD.7z /OPL/Release/${{ steps.version.outputs.version }}/
args: put -c OPNPS2LD.7z /OPL/Release/${{ steps.version.outputs.version }}${{ steps.parent.outputs.parent }}/