Skip to content

Commit 4014f14

Browse files
mohammadrezaeicodem.r
and
m.r
committed
V7.0.0 (#4)
* Create manually_test.yml * feature: init V7.0.0 * add comment to interface and main func & update readme --------- Co-authored-by: m.r <[email protected]>
1 parent 01458f8 commit 4014f14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5967
-4326
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Manually Publish Github Package
5+
6+
# on:
7+
# release:
8+
# types: [created]
9+
# name: Manually Test
10+
on:
11+
workflow_dispatch
12+
# inputs:
13+
# branch:
14+
# description: 'Branch for Publish'
15+
# required: true
16+
# default: 'main'
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- run: npm ci
27+
- run: npm test
28+
29+
publish-gpr:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
packages: write
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-node@v4
38+
with:
39+
node-version: 20
40+
registry-url: https://npm.pkg.github.com/
41+
- run: npm ci
42+
- run: npm publish
43+
env:
44+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Manually Release & Publish Package
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
skip-release:
6+
description: 'Skip Release Job'
7+
required: true
8+
default: 'false'
9+
type: choice
10+
options:
11+
- 'false'
12+
- 'true'
13+
skip-publish-gpr:
14+
description: 'Skip publish Github Job'
15+
required: true
16+
default: 'false'
17+
type: choice
18+
options:
19+
- 'false'
20+
- 'true'
21+
# push:
22+
# branches:
23+
# - main
24+
# paths:
25+
# - CHANGELOG.md
26+
# pull_request:
27+
# branches:
28+
# - main
29+
# paths:
30+
# - CHANGELOG.md
31+
jobs:
32+
release:
33+
if: ${{ github.event.inputs.skip-release == 'false' }}
34+
name: Create release package
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout to code
38+
uses: actions/checkout@v4
39+
- name: install Node js Version 20.x
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: '20.x'
43+
- name: Retrieve Release Version
44+
run: echo "PV=$(node version.js)" >> $GITHUB_ENV
45+
- run: cat change-log
46+
- name: Retrieve Release Body
47+
run: |
48+
{
49+
echo 'PB<<EOF'
50+
cat change-log
51+
echo EOF
52+
} >> $GITHUB_ENV
53+
- run: echo ${{env.PV}}
54+
- name: Create Github Release
55+
uses: actions/create-release@v1
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
with:
59+
tag_name: ${{env.PV}}
60+
release_name: Release v${{env.PV}}
61+
body: ${{env.PB}}
62+
publish-gpr:
63+
needs: release
64+
if: ${{always() && (needs.release.result == 'success' || needs.release.result == 'skipped') && github.event.inputs.skip-publish-gpr == 'false'}}
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
68+
packages: write
69+
steps:
70+
- uses: actions/checkout@v4
71+
# Setup .npmrc file to publish to GitHub Packages
72+
- uses: actions/setup-node@v4
73+
with:
74+
node-version: '20.x'
75+
registry-url: 'https://npm.pkg.github.com'
76+
# Defaults to the user or organization that owns the workflow file
77+
scope: '@mohammadrezaeicode'
78+
- run: npm set @mohammadrezaeicode:registry=https://npm.pkg.github.com/
79+
- run: npm login --scope=@mohammadrezaeicode --registry=https://npm.pkg.github.com
80+
- run: npm adduser
81+
- run: npm ci
82+
- run: npm publish
83+
env:
84+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
publish:
86+
name: Publish to NPM
87+
needs: publish-gpr
88+
if: ${{always() && (needs.publish-gpr.result == 'success' || needs.publish-gpr.result == 'skipped') }}
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Checkout to code
92+
uses: actions/checkout@v4
93+
- name: install Node js Version 20.x
94+
uses: actions/setup-node@v4
95+
with:
96+
node-version: '20.x'
97+
registry-url: 'https://registry.npmjs.org'
98+
- run: npm ci
99+
- name: publish to npm
100+
run: npm publish
101+
env:
102+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/manually-test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Manually Test
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: 'Test Branch'
7+
required: true
8+
default: 'main'
9+
os:
10+
description: 'Operating System'
11+
type: choice
12+
required: true
13+
default: 'ubuntu-latest'
14+
options:
15+
- 'windows-latest'
16+
- 'ubuntu-latest'
17+
node_version:
18+
description: 'Node Environment'
19+
required: true
20+
default: '20.x'
21+
jobs:
22+
test:
23+
name: Test
24+
timeout-minutes: 30
25+
continue-on-error: true
26+
runs-on: ${{ github.event.inputs.os }}
27+
steps:
28+
- name: Checkout to code
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.event.inputs.branch }}
32+
- name: install Node js Version 20
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ github.event.inputs.node_version }}
36+
- name: install dependency
37+
run: npm install
38+
- name: Run test
39+
run: npm run test

.github/workflows/release.yml

-61
This file was deleted.

.npmrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
@mohammadrezaeicode:registry=https://npm.pkg.github.com
1+
//@npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
2+
mohammadrezaeicode:registry=https://npm.pkg.github.com
3+
always-auth=true

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## Version 7.0.0 (2025-02-16)
4+
5+
### New Features
6+
7+
- A drop-down option (multi-select option) provides the ability to create a cell that contains multiple selectable values.`sheet`->`[n]`->`dropDowns`
8+
- The `replaceInExcel` functionality in Excel allows you to replace data in an existing file using flags provided within the spreadsheet.
9+
10+
### Bug Fixes
11+
12+
- `generateExcel` supports empty objects and will generate an empty Excel file.
13+
14+
> [!NOTE]
15+
> The related interface has not changed, so the sheet needs to be provided in TypeScript.
16+
17+
### Improvements
18+
19+
- Begin adding JSDoc comments to the main functions and interfaces.
20+
21+
322
## Version 6.0.1 (2024-08-11)
423

524
### New Features

0 commit comments

Comments
 (0)