Skip to content

Commit

Permalink
Merge pull request #3 from anantakumarghosh/development
Browse files Browse the repository at this point in the history
fix(config): 💚 create ci (#1)
  • Loading branch information
anantakumarghosh authored Feb 1, 2024
2 parents 677a8ab + eca46aa commit e56dba5
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 25 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- 'development'

name: Create Release

Expand All @@ -16,13 +18,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@master

# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '16'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'

# - name: Install dependencies
# run: npm install -g standard-version
- name: Install dependencies
run: npm install -g standard-version

# - name: Generate release notes
# id: release
Expand All @@ -35,23 +37,16 @@ jobs:
# - name: Display release notes
# run: echo "${{ steps.release.outputs.release_notes }}"

# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: ${{ steps.release.outputs.release_notes }}
# # body_path: ./CHANGELOG.md
# draft: false
# prerelease: false

- name: Release Please
uses: google-github-actions/release-please-action@v4
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
token: ${{ secrets.GITHUB_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
# body: ${{ steps.release.outputs.release_notes }}
# body_path: ./CHANGELOG.md
draft: false
prerelease: false

68 changes: 68 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Tag Release CI on PR Merge to Development

on:
workflow_dispatch:
inputs:
version_type:
type: choice
description: Choose version bump type
options:
- -r major
- -r minor
- -r patch
- -p alpha
- -p beta
- -p build
- -p hotfix
- -p build
required: true
default: "build"
pull_request:
types:
- closed
branches:
- 'development'
jobs:
# build:
# runs-on: ubuntu-latest

# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2

# - name: Set up Node.js
# uses: actions/setup-node@v2
# with:
# node-version: 14

# - name: Install Dependencies
# run: npm install

# - name: Run Tests
# run: npm test

deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'development'

steps:
- name: Checkout Repository
uses: actions/checkout@v3
# with:
# path: development

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Change version
run: npm run release -- ${{ github.event.inputs.repo_names }}

- name: Push Tags
run: git push --follow-tags origin development


# npm run release -- -r patch
# npm run release -- --prerelease beta

0 comments on commit e56dba5

Please sign in to comment.