Skip to content

[PluginUpdate]: Input Shaping Plugin #412

[PluginUpdate]: Input Shaping Plugin

[PluginUpdate]: Input Shaping Plugin #412

name: merge-pr-on-issue-approval
on:
issues:
types:
- labeled
jobs:
merge-pr:
if: ${{ github.event.label.name == 'approved' }}
runs-on: ubuntu-latest
steps:
- name: merge-pr
run: |
url=$(curl \
-H "Accept: application/vnd.github+json" -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" https://api.github.com/repos/Duet3D/PluginRepository/pulls \
| jq '.[] | select(.title | startswith("[${{ github.event.issue.number }}]"))' | jq ."url" | sed 's/"//g')/merge
echo $url
echo $(curl -X PUT -H "Accept: application/vnd.github+json" -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" $url | jq ) > merge_response.json
cat merge_response.json | jq
merged=$(cat merge_response.json | jq ."merged" | sed 's/"//g')
if [[ "$merged" = true ]]; then curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" https://api.github.com/repos/Duet3D/PluginRepository/issues/${{ github.event.issue.number }}/labels -d '{"labels":["merged"]}' && curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" https://api.github.com/repos/Duet3D/PluginRepository/issues/${{ github.event.issue.number }} -d '{"state":"closed"}' && exit 0; else exit 1; fi
update-version:
needs: merge-pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: update-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "yasasw"
git config --global user.email "[email protected]"
git pull
cp package.json nodescriptsTS/src/
cd nodescriptsTS
npm install
cd src
npx ts-node updateVersion.ts
cd ../../
rm package.json
cp nodescriptsTS/src/package.json package.json
git add package.json
git commit -m "Update version"
git push -u origin master
deploy-gh-pages:
needs: update-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: build
run: |
set -e
git pull
npm install
npm run build
cp CNAME src/.vuepress/dist
cp plugin_stats.json src/.vuepress/dist/assets
cp -r plugin_versions src/.vuepress/dist/assets
cp author_stats.json src/.vuepress/dist/assets
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.PAT_YASASW }}
publish_dir: ./src/.vuepress/dist
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'