Skip to content

Commit

Permalink
gitflow release via github action
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed May 3, 2024
1 parent 01b1711 commit cabbcf0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 18 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/gitflow-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: GitFlow Release

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install git flow extensions
run: |
sudo apt-get install git-flow
- name: Initialize git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]
- name: Read properties from package.json
id: package_json
uses: zoexx/[email protected]
with:
file_path: package.json

#- run: npm ci
#- run: npm run test:unit
#- run: npm run build

- run: git flow init --defaults
- run: git flow release start ${{ steps.package_json.outputs.version }}
- run: git flow release finish ${{ steps.package_json.outputs.version }} --push --message "Release"

- name: set next version
run: |
npm --no-git-tag-version version patch
git add package.json package-lock.json
git commit --message "set next version"
git push
- name: Checkout tag
run: |
git checkout tags/${{ steps.package_json.outputs.version }}
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
18 changes: 0 additions & 18 deletions .github/workflows/release-from-tag.yml

This file was deleted.

0 comments on commit cabbcf0

Please sign in to comment.