diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..79df00e --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,21 @@ +name: Create Release +run-name: Create release for ${{ github.event.client_payload.version }} + +on: + repository_dispatch: + types: + - craftcms/new-release + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: ncipollo/release-action@v1 + with: + body: ${{ github.event.client_payload.notes }} + makeLatest: ${{ github.event.client_payload.latest }} + name: ${{ github.event.client_payload.version }} + prerelease: ${{ github.event.client_payload.prerelease }} + tag: ${{ github.event.client_payload.tag }} \ No newline at end of file diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 0000000..ce9ae78 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,32 @@ +name: Format code + +on: + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.head_ref }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + coverage: none + tools: composer + + - name: composer install + run: composer install --prefer-dist --no-suggest --no-progress + + - name: format + run: composer run fix-cs + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Format code + file_pattern: '*.php *.yaml' +