From 1880f01c3792e04d619ea59deda2d048d09dfe3a Mon Sep 17 00:00:00 2001 From: Zuko Date: Sun, 13 Oct 2024 23:19:44 +0700 Subject: [PATCH] Add auto update package on push workflow --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..86b9338 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: Update Packagist + +on: + push: + branches: + - master + +jobs: + update-packagist: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Update Packagist + env: + PACKAGIST_USERNAME: ${{ secrets.PACKAGIST_USERNAME }} + PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} + run: | + curl -X POST \ + -H "Content-Type:application/json" \ + -d '{"username": "${{ env.PACKAGIST_USERNAME }}", "apiToken": "${{ env.PACKAGIST_TOKEN }}"}' \ + https://packagist.org/api/update/zuko/flex2cell