Skip to content

Commit

Permalink
Release drafter (#96)
Browse files Browse the repository at this point in the history
* Use release drafter

* Revert CodeQL GH action
  • Loading branch information
bieniu committed Dec 20, 2022
1 parent 8f1a5fc commit 7c956b4
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
change-template: "- #$NUMBER $TITLE @$AUTHOR"
sort-direction: ascending

categories:
- title: ":boom: Breaking Changes"
label: "breaking-change"

- title: ":sparkles: New Features"
label: "new-feature"

- title: ":zap: Performance"
label: "performance"

- title: ":recycle: Refactor"
label: "refactor"

- title: ":green_heart: CI"
label: "ci"

- title: ":bug: Bug Fixes"
label: "bugfix"

- title: ":white_check_mark: Test"
label: "test"

- title: ":arrow_up: Dependency Updates"
label: "dependencies"
collapse-after: 1

include-labels:
- "breaking-change"
- "performance"
- "refactor"
- "new-feature"
- "bugfix"
- "dependencies"
- "test"
- "ci"

template: |
$CHANGES
38 changes: 38 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "21 5 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["python"]

steps:
- name: Checkout repository
uses: actions/checkout@v3.2.0

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
32 changes: 32 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Drafter

on:
push:
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
name: Release Drafter
steps:
- name: Checkout the repository
uses: actions/checkout@v3.2.0
with:
fetch-depth: 0

- name: Find Version
id: version
run: |
declare -i newpost
version=$(python setup.py --version)
echo Version from setup.py: $version
echo "::set-output name=version::$version"
- name: Run Release Drafter
uses: release-drafter/release-drafter@v5.21.1
with:
tag: ${{ steps.version.outputs.version }}
name: Version ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7c956b4

Please sign in to comment.