Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
changelog workflow (#1)
Browse files Browse the repository at this point in the history
* changelog workflow

* Release

* labeler

* labeler

* patch

* review
  • Loading branch information
pookmish authored Mar 10, 2020
1 parent e7aef1c commit d2ab769
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/auto-label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

{
"rules": {
"patch": ["*"],
"review": ["*"],
"frontend": ["*.js", "*.scss", "*.css", "*.twig", ".theme"],
"backend": ["*.php", "*.module"],
"ci": [".circleci", ".github"]
}
}
40 changes: 40 additions & 0 deletions .github/workflows/changelog_update.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
12 changes: 12 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit d2ab769

Please sign in to comment.