Skip to content

Commit

Permalink
Merge pull request #34 from RedAtman/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
RedAtman authored Jul 20, 2024
2 parents 19f9703 + 4c03d70 commit e5ab673
Showing 1 changed file with 37 additions and 18 deletions.
55 changes: 37 additions & 18 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,53 @@
name: Create Release and Tag on Merge

on:
pull_request:
types: [closed]
push:
# pull_request:
# types: [closed]

jobs:
create-release:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
# if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: paulhatch/[email protected]
id: generate-version
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
tag_prefix: "st4-"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
version_format: "st4-${major}.${minor}.${patch}"
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Check release output
run: |
echo tag_version.output: "${{ steps.tag_version.outputs }}"
- name: Create Release
id: create-release
uses: undergroundwires/[email protected]
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
git-token: ${{ secrets.ACTION_TOKEN }}
release-token: ${{ secrets.ACTION_TOKEN }}
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

# - name: Set up Git
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"

# - uses: paulhatch/[email protected]
# id: generate-version
# with:
# tag_prefix: "st4-"
# major_pattern: "(MAJOR)"
# minor_pattern: "(MINOR)"
# version_format: "st4-${major}.${minor}.${patch}"

# - name: Create Release
# id: create-release
# uses: undergroundwires/[email protected]
# with:
# git-token: ${{ secrets.ACTION_TOKEN }}
# release-token: ${{ secrets.ACTION_TOKEN }}

0 comments on commit e5ab673

Please sign in to comment.