Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add release drafter common github action. #76

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# WARNING: Actions in this file can access repository secrets. They should never
# execute code of the pull request. All scripts should be fetched from merged
# TokTok code.
on:
workflow_call:
on: [workflow_call]

jobs:
check-release:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: checks

on:
pull_request_target:
branches: [master]

jobs:
checks:
uses: ./.github/workflows/check-release.yml
26 changes: 26 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# WARNING: Actions in this file can access repository secrets. They should never
# execute code of the pull request. All scripts should be fetched from merged
# TokTok code.
on: [workflow_call]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: release

on:
push:
branches: [master]
pull_request_target:
branches: [master]
types: [opened, reopened, synchronize]

jobs:
release:
uses: ./.github/workflows/release-drafter.yml
Loading