Skip to content

Commit 4aa243a

Browse files
committed
Modify zip format
1 parent 4e5a00b commit 4aa243a

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Package Plugin or using [nest](https://github.com/mtj0928/nest).
2020

2121
## Usage
2222

23-
> [!NOTE]
24-
> You can refer the settings in [giginet/github-action-artifactbundle-example](https://github.com/giginet/github-action-artifactbundle-example)
23+
> [!NOTE] You can refer the settings in
24+
> [giginet/github-action-artifactbundle-example](https://github.com/giginet/github-action-artifactbundle-example)
2525
2626
This plugin collect executables from the repository and compress them into
2727
`*.artifactbundle.zip`. This plugin just make a bundle, so you need to set up
@@ -57,13 +57,13 @@ jobs:
5757
NEW_BODY="$(printf "%s\n%s" "$BODY" "$SHA256")"
5858
gh release edit "${TAG_NAME}" --notes "${NEW_BODY}"
5959
env:
60-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}```
60+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
```
6162
62-
> [!NOTE]
63-
> You need to configure the permission in the GitHub Action settings to upload the artifacts.
63+
> [!NOTE] You need to configure the permission in the GitHub Action settings to
64+
> upload the artifacts.
6465
> https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository
6566
66-
6767
### Inputs
6868
6969
| Required | Key | Description | Default Value |

β€Žbadges/coverage.svgβ€Ž

Lines changed: 1 addition & 1 deletion
Loading

β€Ždist/index.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždist/index.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/archiver.tsβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fs from 'fs'
2+
import * as path from 'path'
23
import archiver from 'archiver'
34

45
class ZipArchiver {
@@ -14,7 +15,8 @@ class ZipArchiver {
1415

1516
archive.pipe(output)
1617

17-
archive.directory(directory, false)
18+
const dirName = path.basename(directory)
19+
archive.directory(directory, dirName)
1820

1921
archive.finalize()
2022
})

0 commit comments

Comments
Β (0)