Skip to content

Commit

Permalink
chore: gh release
Browse files Browse the repository at this point in the history
  • Loading branch information
teodora-sandu committed Mar 11, 2024
1 parent 23a2061 commit 9786444
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
categories:
- title: Breaking Changes 🛠
labels:
- breaking
- title: Exciting New Features 🎉
labels:
- feature
- title: Fixes 🔧
labels:
- fix
- title: Other Changes
labels:
- "*"
13 changes: 13 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR labels
on:
pull_request:
types: [ opened, reopened, edited, labeled, unlabeled ]
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create labels for CHANGELOG
uses: bcoe/conventional-release-labels@v1
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
push
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- uses: paulhatch/semantic-version@v5.3.0
id: semantic_version
with:
tag_prefix: "v"

- name: Create tag
run: git tag ${{ steps.semantic_version.outputs.version }}

- name: Push tag
run: git push --tags

- name: Release
run: gh release create ${{ steps.semantic_version.outputs.version }} --generate-notes
env:
GH_TOKEN: ${{ github.token }}
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,12 @@ git push
```

Do not hold onto your changes for too long. Commit and push frequently and create a pull request as soon as possible for backup and visibility.

## Creating PRs

We use a [GitHub Action](https://github.com/marketplace/actions/conventional-release-labels) to generate labels which are then used to generate the relase notes when merging the PR.

## Merging PRs

We use a [GitHub Action](https://github.com/PaulHatch/semantic-version) to compute the version based on conventional commit messages, push a tag with the computed version, then use
the [GitHub Release CLI](https://cli.github.com/manual/gh_release_create) to generate release notes based on labels.

0 comments on commit 9786444

Please sign in to comment.