Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbasuil committed Jul 23, 2024
2 parents 5cd7930 + 743c3f4 commit 95baba5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 86 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/create-new-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: "Create new release"

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
version:
description: "Select the version increment"
required: true
type: choice
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease

jobs:
create-new-release:
Expand All @@ -21,12 +35,45 @@ jobs:
- name: Setup env
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env

- name: Install dependencies
run: yarn install
- name: Bump version in package.json
run: yarn version ${{ github.event.inputs.version }}

- name: Extract version from package.json
id: extract_version
run: |
version=$(grep '"version"' package.json | sed -E 's/.*"version": "([^"]+)".*/\1/')
echo "Extracted version: $version"
echo "::set-output name=version::$version"
- name: Create version bump branch
run: git checkout -b release/v${{ steps.extract_version.outputs.version }}

- name: Initialize mandatory git config
uses: fregante/setup-git-user@v2

- name: Commit manifest files
id: make-commit
run: |
git add package.json
git commit --message "Update package.json v${{ steps.extract_version.outputs.version }}"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Publish release branch
run: git push origin release/v${{ steps.extract_version.outputs.version }}

- name: Merge version update into main branch
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/v${{ steps.extract_version.outputs.version }}
base: main
title: "Merge release/v${{ steps.extract_version.outputs.version }} into main branch"

- name: Install dependencies
run: yarn install

# Build assets
- run: yarn build
- run: npm pack
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/prepare-release.yml

This file was deleted.

0 comments on commit 95baba5

Please sign in to comment.