Skip to content

Commit

Permalink
Refacto - update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rhannachi committed Jul 25, 2023
1 parent 04944ee commit 3aed181
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 40 deletions.
53 changes: 40 additions & 13 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
needs: [test]
name: "Deploy on Chromatic"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/mainFALSE'
environment:
name: Production
steps:
Expand Down Expand Up @@ -252,9 +252,9 @@ jobs:

extract-version:
needs: [ test ]
name: "Extract version (package.json)"
name: "Extract package version"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/mainFALSE'
environment:
name: Production
outputs:
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
needs: [ extract-version ]
name: "Create Tag"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/mainFALSE'
environment:
name: Production
steps:
Expand All @@ -300,16 +300,16 @@ jobs:
echo "Tag already present: ${{ steps.create-tag.outputs.tag_exists }}"
release:
needs: [ create-tag ]
needs: [ test ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: Production
steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags
# - name: Prepare repository
# run: git fetch --unshallow --tags

- uses: pnpm/action-setup@v2
with:
Expand All @@ -326,12 +326,39 @@ jobs:
with:
name: my_node_modules_artifact

- name: unzip node_modules
- name: Unzip node_modules
run: tar -xzf node_modules.tar.gz

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
###
- name: Get package version
id: get-version
run: |
pnpm release
version=v$(pnpm pkg get version | tr -d '"')
echo "version=$version" >> $GITHUB_OUTPUT
echo "====> $version"
shell: bash

- uses: rickstaa/action-create-tag@v1
id: create-tag
with:
tag: ${{ steps.get-version.outputs.version }}
tag_exists_error: false
message: ${{ steps.get-version.outputs.version }}
- run: |
echo "Tag already present: ${{ steps.create-tag.outputs.tag_exists }}"
## #

- name: Extract release notes from CHANGELOG.md
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
with:
changelog_file: CHANGELOG.md

- name: "Create a GitHub release ${{ steps.get-version.outputs.version }}"
uses: ncipollo/release-action@v1
with:
tag: "v${{ steps.get-version.outputs.version }}"
name: "Release v${{ steps.get-version.outputs.version }}"
body: |
## Release notes:
${{ steps.extract-release-notes.outputs.release_notes }}
57 changes: 30 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
# v1.1.4 (Sat Jul 23 2023)

- add new colors for `Icon`.

#### Authors: 1

# v1.1.3 (Sat Jul 22 2023)

- Update CI to automatically integrate releases.

#### Authors: 1

# v1.1.2 (Sat Jul 22 2023)

- Update CI to automatically integrate releases.

#### Authors: 1

- Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))

# v1.1.1 (Sat Jul 22 2023)

- Created first version of the design system, with `Checkbox`, `Icon`, `Task`, `TaskSkeleton`, `TasksBox` and `Tasks` components.

#### Authors: 1

- Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.4] - 2023-07-25
### Features
* add new colors for `Icon`.
### Contributors to this release
* Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))

## [1.1.3] - 2023-07-23
### Chores
* Update CI to automatically integrate releases.
### Contributors to this release
* Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))

## [1.1.2] - 2023-07-23
### Chores
* Update CI to automatically integrate releases.
### Contributors to this release
* Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))

## [1.1.1] - 2023-07-23
### Features
* Created first version of the design system, with `Checkbox`, `Icon`, `Task`, `TaskSkeleton`, `TasksBox` and `Tasks` components.
### Contributors to this release
* Ramzi Hannachi ([@rhannachi](https://github.com/rhannachi))

0 comments on commit 3aed181

Please sign in to comment.