Skip to content

Commit

Permalink
migrating publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova committed Jan 10, 2022
1 parent 4bcadd7 commit 254c47f
Showing 1 changed file with 4 additions and 43 deletions.
47 changes: 4 additions & 43 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 254c47f

Please sign in to comment.