From 6ce37daf27b80a90a273f6635db6c0667dda97a8 Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Tue, 26 Mar 2024 21:11:46 +0100 Subject: [PATCH] Added github actions for CI & release --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .github/workflows/create-release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c043d29 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: ci +on: + workflow_dispatch: + push: + branches: + - develop + - develop-v5 +permissions: + contents: read +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true +jobs: + ci: + name: ci + uses: studioespresso/.github/.github/workflows/ci.yml@main + with: + craft_version: '5' + jobs: '["ecs", "phpstan"]' + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..b96abe3 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,24 @@ +# Creates a new GitHub Release whenever the Craft Plugin Store +# is notified of a new version tag. + +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 }}