Skip to content

Commit

Permalink
ci(tagpr): Create a new tag automatically (#12)
Browse files Browse the repository at this point in the history
tagpr creates a tag when the main branch has a new commit.
  • Loading branch information
5ouma authored Mar 12, 2024
1 parent 598278e commit a7c92c5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:

steps:
- name: 🚫 Base Branch is wrong
if: ${{ github.head_ref != 'dev' && github.base_ref == 'main' }}
if: ${{ github.base_ref == 'main' && github.head_ref != 'dev' && !startsWith(github.base_ref, 'tagpr-from-') }}
run: echo "Base branch should be \`dev\`." && return 1
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🚀 Release

on:
push:
branches:
- "dev"

permissions:
pull-requests: write

jobs:
Release:
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@v4

- name: 🏷️ Create a New Tag
id: tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .tagpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[tagpr]
releaseBranch = "main"
versionFile = "-"
vPrefix = true
changelog = false
release = true
majroLabels = "Type: Breaking Change"
minorLabels = "Type: Feature"

0 comments on commit a7c92c5

Please sign in to comment.