Skip to content

Commit

Permalink
V7.0.0 (#4)
Browse files Browse the repository at this point in the history
* Create manually_test.yml

* feature: init V7.0.0

* add comment to interface and main func & update readme

---------

Co-authored-by: m.r <mr@example.com>
  • Loading branch information
mohammadrezaeicode and m.r committed Feb 17, 2025
1 parent 01458f8 commit d322cb4
Show file tree
Hide file tree
Showing 55 changed files with 5,966 additions and 4,325 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/manually-npm-publish-github-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Manually Publish Github Package

# on:
# release:
# types: [created]
# name: Manually Test
on:
workflow_dispatch
# inputs:
# branch:
# description: 'Branch for Publish'
# required: true
# default: 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
102 changes: 102 additions & 0 deletions .github/workflows/manually-release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Manually Release & Publish Package
on:
workflow_dispatch:
inputs:
skip-release:
description: 'Skip Release Job'
required: true
default: 'false'
type: choice
options:
- 'false'
- 'true'
skip-publish-gpr:
description: 'Skip publish Github Job'
required: true
default: 'false'
type: choice
options:
- 'false'
- 'true'
# push:
# branches:
# - main
# paths:
# - CHANGELOG.md
# pull_request:
# branches:
# - main
# paths:
# - CHANGELOG.md
jobs:
release:
if: ${{ github.event.inputs.skip-release == 'false' }}
name: Create release package
runs-on: ubuntu-latest
steps:
- name: Checkout to code
uses: actions/checkout@v4
- name: install Node js Version 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Retrieve Release Version
run: echo "PV=$(node version.js)" >> $GITHUB_ENV
- run: cat change-log
- name: Retrieve Release Body
run: |
{
echo 'PB<<EOF'
cat change-log
echo EOF
} >> $GITHUB_ENV
- run: echo ${{env.PV}}
- name: Create Github Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{env.PV}}
release_name: Release v${{env.PV}}
body: ${{env.PB}}
publish-gpr:
needs: release
if: ${{always() && (needs.release.result == 'success' || needs.release.result == 'skipped') && github.event.inputs.skip-publish-gpr == 'false'}}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@mohammadrezaeicode'
- run: npm set @mohammadrezaeicode:registry=https://npm.pkg.github.com/
- run: npm login --scope=@mohammadrezaeicode --registry=https://npm.pkg.github.com
- run: npm adduser
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish to NPM
needs: publish-gpr
if: ${{always() && (needs.publish-gpr.result == 'success' || needs.publish-gpr.result == 'skipped') }}
runs-on: ubuntu-latest
steps:
- name: Checkout to code
uses: actions/checkout@v4
- name: install Node js Version 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
39 changes: 39 additions & 0 deletions .github/workflows/manually-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Manually Test
on:
workflow_dispatch:
inputs:
branch:
description: 'Test Branch'
required: true
default: 'main'
os:
description: 'Operating System'
type: choice
required: true
default: 'ubuntu-latest'
options:
- 'windows-latest'
- 'ubuntu-latest'
node_version:
description: 'Node Environment'
required: true
default: '20.x'
jobs:
test:
name: Test
timeout-minutes: 30
continue-on-error: true
runs-on: ${{ github.event.inputs.os }}
steps:
- name: Checkout to code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: install Node js Version 20
uses: actions/setup-node@v4
with:
node-version: ${{ github.event.inputs.node_version }}
- name: install dependency
run: npm install
- name: Run test
run: npm run test
61 changes: 0 additions & 61 deletions .github/workflows/release.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@mohammadrezaeicode:registry=https://npm.pkg.github.com
//@npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
mohammadrezaeicode:registry=https://npm.pkg.github.com
always-auth=true
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## Version 7.0.0 (2025-02-16)

### New Features

- A drop-down option (multi-select option) provides the ability to create a cell that contains multiple selectable values.`sheet`->`[n]`->`dropDowns`
- The `replaceInExcel` functionality in Excel allows you to replace data in an existing file using flags provided within the spreadsheet.

### Bug Fixes

- `generateExcel` supports empty objects and will generate an empty Excel file.

> [!NOTE]
> The related interface has not changed, so the sheet needs to be provided in TypeScript.
### Improvements

- Begin adding JSDoc comments to the main functions and interfaces.


## Version 6.0.1 (2024-08-11)

### New Features
Expand Down
Loading

0 comments on commit d322cb4

Please sign in to comment.