Skip to content

Commit

Permalink
Merge pull request #7 from sumedhsakdeo/tagging
Browse files Browse the repository at this point in the history
Github Action to create a new tag on successful main build post PR merge [dry-run]
  • Loading branch information
sumedhsakdeo authored Feb 21, 2024
2 parents e799aac + c9853b4 commit 70733f2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-gradle-openhouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Gradle Build OpenHouse
on:
push:
branches:
- master
- main
pull_request:
types:
- opened
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/tag-openhouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bump version and push tag
on:
pull_request:
types:
- closed
branches:
- main
workflow_run:
workflows: ["Gradle Build OpenHouse"]
types:
- completed
branches:
- main

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true # prefix for tag "v"
DEFAULT_BUMP: patch # major, minor, patch
DRY_RUN: false # if true, will not push tag
INITIAL_VERSION: 0.5.0 # if no tags, will use this version

0 comments on commit 70733f2

Please sign in to comment.