From 254c47f613c911382e4134f115cc835f025e49fe Mon Sep 17 00:00:00 2001 From: Vlad Shcherban Date: Mon, 10 Jan 2022 18:44:28 +0200 Subject: [PATCH] migrating publish script --- .github/workflows/publish.yml | 47 +++-------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d242d5..768cdc7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,53 +2,14 @@ on: push: paths: - 'plugins/**' + - 'docs/**' repository_dispatch: - -env: - releaseName: v${{ github.run_number }} + workflow_dispatch: jobs: publish-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: prepare - run: | - cd plugins - for build in * - do - ( - if [ ! -d "$build" ] ; then continue ; fi - cd "$build" - for platform in * - do - ( - if [ ! -d "$platform" ] ; then continue ; fi - cd "$platform" - if ! ls * &> /dev/null ; then continue ; fi - COPYFILE_DISABLE=true tar -czvf ../../"$build-$platform.tgz" --exclude=".*" * - ) - done - ) - done - - name: Release - uses: softprops/action-gh-release@v1 + - uses: solar2d/directory-plugin-action@main with: - files: plugins/*.tgz - name: Release ${{ env.releaseName }} - tag_name: ${{ env.releaseName }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Directory update request - run: | - [ -z "${{ secrets.ISSUE_PAT }}" ] && echo "Skipping, no ISSUE_PAT" && exit 0 - curl --request POST \ - --url https://api.github.com/repos/solar2d/plugins.solar2d.com/dispatches \ - --header 'authorization: Bearer ${{ secrets.ISSUE_PAT }}' \ - --header 'content-type: application/json' \ - --data '{ - "event_type": "repo_updated", - "client_payload": { - "repo": "${{ github.repository }}" - } - }' + pat: ${{ secrets.ISSUE_PAT }}