diff --git a/.github/auto-label.json b/.github/auto-label.json new file mode 100644 index 0000000..705c76f --- /dev/null +++ b/.github/auto-label.json @@ -0,0 +1,10 @@ + +{ + "rules": { + "patch": ["*"], + "review": ["*"], + "frontend": ["*.js", "*.scss", "*.css", "*.twig", ".theme"], + "backend": ["*.php", "*.module"], + "ci": [".circleci", ".github"] + } +} diff --git a/.github/workflows/changelog_update.yml b/.github/workflows/changelog_update.yml new file mode 100644 index 0000000..f9862bb --- /dev/null +++ b/.github/workflows/changelog_update.yml @@ -0,0 +1,40 @@ +on: + release: + type: published + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.8" + - name: Update version + id: version + run: | + echo "GITHUB_REF is a tag you set for the release" + echo "Your GitHub ref: ${GITHUB_REF}" + VERSION=`echo "${GITHUB_REF}" | cut -f 3 -d "/"` + echo "Preparing version ${VERSION}" + echo "__version__ = \"${VERSION}\"" > __version__.py + echo "##[set-output name=version;]$(echo ${VERSION})" + - uses: vemel/update-changelog@0.0.1 + id: changelog + with: + version: ${{ steps.version.outputs.version }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + commit-message: Release ${{ steps.version.outputs.version }} + labels: release, bot + title: "Release ${{ steps.version.outputs.version }}" + body: | + # Release ${{ steps.version.outputs.version }} + + Merge this PR to update your version and changelog! + + ## Included Pull Requests + + ${{ steps.changelog.outputs.pulls_list_md }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..f721cea --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: PR Labeler +on: + pull_request: + types: [opened, synchronize] +jobs: + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: banyan/auto-label@1.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3ce42a0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +# .github/workflows/release.yml +name: Release + +on: + pull_request: + types: closed + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Tag + uses: K-Phoen/semver-release-action@master + with: + release_branch: master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}