Skip to content

Commit 35ceb03

Browse files
committed
20220919A
1 parent 06fcc46 commit 35ceb03

File tree

9 files changed

+147
-80
lines changed

9 files changed

+147
-80
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ body:
1818
description: "What versions are affected? Versions must be listed as supported in the Security Policy (file: `SECURITY.md`)."
1919
multiple: true
2020
options:
21+
- "v1.0.2"
2122
- "v1.0.1"
22-
- "v1.0.0"
23-
- "v0.5.5"
24-
- "v0.5.4"
2523
validations:
2624
required: false
2725
- type: "textarea"

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
# GitHub Actions Toolkit (PowerShell)
1+
# GitHub Actions Toolkit (![PowerShell](https://img.shields.io/badge/PowerShell-5391FE?logo=powershell&logoColor=ffffff&style=flat-square "PowerShell"))
22

33
[`GitHubActionsToolkit.PowerShell`](https://github.com/hugoalh-studio/ghactions-toolkit-powershell)
4-
[![GitHub Contributors](https://img.shields.io/github/contributors/hugoalh-studio/ghactions-toolkit-powershell?label=Contributors&logo=github&logoColor=ffffff&style=flat-square)](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/graphs/contributors)
5-
[![GitHub Issues](https://img.shields.io/github/issues-raw/hugoalh-studio/ghactions-toolkit-powershell?label=Issues&logo=github&logoColor=ffffff&style=flat-square)](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/issues)
6-
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr-raw/hugoalh-studio/ghactions-toolkit-powershell?label=Pull%20Requests&logo=github&logoColor=ffffff&style=flat-square)](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/pulls)
7-
[![GitHub Discussions](https://img.shields.io/github/discussions/hugoalh-studio/ghactions-toolkit-powershell?label=Discussions&logo=github&logoColor=ffffff&style=flat-square)](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/discussions)
8-
[![GitHub Stars](https://img.shields.io/github/stars/hugoalh-studio/ghactions-toolkit-powershell?label=Stars&logo=github&logoColor=ffffff&style=flat-square)](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/stargazers)
9-
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/hugoalh-studio/ghactions-toolkit-powershell?label=Grade&logo=codefactor&logoColor=ffffff&style=flat-square)](https://www.codefactor.io/repository/github/hugoalh-studio/ghactions-toolkit-powershell)
10-
[![License](https://img.shields.io/static/v1?label=License&message=MIT&style=flat-square)](./LICENSE.md)
11-
12-
| **Release** | **Latest** (![GitHub Latest Release Date](https://img.shields.io/github/release-date/hugoalh-studio/ghactions-toolkit-powershell?label=%20&style=flat-square)) | **Pre** (![GitHub Latest Pre-Release Date](https://img.shields.io/github/release-date-pre/hugoalh-studio/ghactions-toolkit-powershell?label=%20&style=flat-square)) |
4+
5+
![License](https://img.shields.io/static/v1?label=License&message=MIT&style=flat-square "License")
6+
[![GitHub Stars](https://img.shields.io/github/stars/hugoalh-studio/ghactions-toolkit-powershell?label=Stars&logo=github&logoColor=ffffff&style=flat-square "GitHub Stars")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/stargazers)
7+
[![GitHub Contributors](https://img.shields.io/github/contributors/hugoalh-studio/ghactions-toolkit-powershell?label=Contributors&logo=github&logoColor=ffffff&style=flat-square "GitHub Contributors")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/graphs/contributors)
8+
[![GitHub Issues](https://img.shields.io/github/issues-raw/hugoalh-studio/ghactions-toolkit-powershell?label=Issues&logo=github&logoColor=ffffff&style=flat-square "GitHub Issues")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/issues)
9+
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr-raw/hugoalh-studio/ghactions-toolkit-powershell?label=Pull%20Requests&logo=github&logoColor=ffffff&style=flat-square "GitHub Pull Requests")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/pulls)
10+
[![GitHub Discussions](https://img.shields.io/github/discussions/hugoalh-studio/ghactions-toolkit-powershell?label=Discussions&logo=github&logoColor=ffffff&style=flat-square "GitHub Discussions")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/discussions)
11+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/hugoalh-studio/ghactions-toolkit-powershell?label=Grade&logo=codefactor&logoColor=ffffff&style=flat-square "CodeFactor Grade")](https://www.codefactor.io/repository/github/hugoalh-studio/ghactions-toolkit-powershell)
12+
13+
| **Releases** | **Latest** (![GitHub Latest Release Date](https://img.shields.io/github/release-date/hugoalh-studio/ghactions-toolkit-powershell?label=&style=flat-square "GitHub Latest Release Date")) | **Pre** (![GitHub Latest Pre-Release Date](https://img.shields.io/github/release-date-pre/hugoalh-studio/ghactions-toolkit-powershell?label=&style=flat-square "GitHub Latest Pre-Release Date")) |
1314
|:-:|:-:|:-:|
14-
| [**GitHub**](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/releases) ![GitHub Total Downloads](https://img.shields.io/github/downloads/hugoalh-studio/ghactions-toolkit-powershell/total?label=%20&style=flat-square) | ![GitHub Latest Release Version](https://img.shields.io/github/release/hugoalh-studio/ghactions-toolkit-powershell?sort=semver&label=%20&style=flat-square) | ![GitHub Latest Pre-Release Version](https://img.shields.io/github/release/hugoalh-studio/ghactions-toolkit-powershell?include_prereleases&sort=semver&label=%20&style=flat-square) |
15-
| [**PowerShell Gallery**](https://www.powershellgallery.com/packages/hugoalh.GitHubActionsToolkit) ![PowerShell Gallery Total Downloads](https://img.shields.io/powershellgallery/dt/hugoalh.GitHubActionsToolkit?label=%20&style=flat-square) | ![PowerShell Gallery Latest Release Version](https://img.shields.io/powershellgallery/v/hugoalh.GitHubActionsToolkit?label=%20&style=flat-square) | ![PowerShell Gallery Latest Release Version](https://img.shields.io/powershellgallery/v/hugoalh.GitHubActionsToolkit?include_prereleases&label=%20&style=flat-square) |
15+
| [![GitHub](https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=ffffff&style=flat-square "GitHub")](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/releases) ![GitHub Total Downloads](https://img.shields.io/github/downloads/hugoalh-studio/ghactions-toolkit-powershell/total?label=&style=flat-square "GitHub Total Downloads") | ![GitHub Latest Release Version](https://img.shields.io/github/release/hugoalh-studio/ghactions-toolkit-powershell?sort=semver&label=&style=flat-square "GitHub Latest Release Version") | ![GitHub Latest Pre-Release Version](https://img.shields.io/github/release/hugoalh-studio/ghactions-toolkit-powershell?include_prereleases&sort=semver&label=&style=flat-square "GitHub Latest Pre-Release Version") |
16+
| [![PowerShell Gallery](https://img.shields.io/badge/PowerShell%20Gallery-5391FE?logo=powershell&logoColor=ffffff&style=flat-square "PowerShell Gallery")](https://www.powershellgallery.com/packages/hugoalh.GitHubActionsToolkit) ![PowerShell Gallery Total Downloads](https://img.shields.io/powershellgallery/dt/hugoalh.GitHubActionsToolkit?label=&style=flat-square "PowerShell Gallery Total Downloads") | ![PowerShell Gallery Latest Release Version](https://img.shields.io/powershellgallery/v/hugoalh.GitHubActionsToolkit?label=&style=flat-square "PowerShell Gallery Latest Release Version") | ![PowerShell Gallery Latest Pre-Release Version](https://img.shields.io/powershellgallery/v/hugoalh.GitHubActionsToolkit?include_prereleases&label=&style=flat-square "PowerShell Gallery Latest Pre-Release Version") |
1617

1718
## 📝 Description
1819

1920
A PowerShell module to provide a better and easier way for GitHub Actions to communicate with the runner machine, and the toolkit for developing GitHub Actions in PowerShell.
2021

21-
## 📚 Documentation
22+
## 📚 Documentation (Excerpt)
2223

23-
*For the official documentation, please visit [GitHub Repository Wiki](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki).*
24+
For the full documentation, please visit [GitHub Repository Wiki](https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki).
2425

25-
### Getting Started (Excerpt)
26+
### Getting Started
2627

2728
#### Install
2829

@@ -42,7 +43,7 @@ Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Scope 'Local'# Recommend
4243
Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Prefix 'GitHubActions' -Scope 'Local'# Changeable Prefix
4344
```
4445

45-
### API (Excerpt)
46+
### API
4647

4748
| **Legend** | **Description** |
4849
|:-:|:--|
@@ -98,7 +99,7 @@ Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Prefix 'GitHubActions' -Scop
9899
- `Write-GitHubActionsRaw`
99100
- `Write-GitHubActionsWarning`
100101

101-
### Example (Excerpt)
102+
### Example
102103

103104
```ps1
104105
Set-GitHubActionsOutput -Name 'foo' -Value 'bar'

SECURITY.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@
1414
| **Releases / Tags / Versions** | **Status** | **Target - PowerShell** | **Target - NodeJS (Wrapper API)** | **Target - NPM (Wrapper API)** |
1515
|:-:|:-:|:-:|:-:|:-:|
1616
| v1.0.X | L | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
17-
| v1.0.0 | 👎{🐛} | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
18-
| v0.5.X | 👎{🐛🧓} | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
19-
| v0.5.0 \~ v0.5.3 | ❌{🐛} | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
20-
| v0.3.X \~ v0.4.X | ❌{🧓} | >= v7.2.0 | *N/A* | *N/A* |
21-
| v0.3.0 \~ v0.3.2 | ❌{🐛🧓} | >= v7.2.0 | *N/A* | *N/A* |
22-
| v0.2.X | ❌{🧓} | >= v7.2.0 | *N/A* | *N/A* |
23-
| < v0.2.X | ❌{🐛🧓} | >= v7.2.0 | *N/A* | *N/A* |
17+
| v1.0.0 | ❌{🐛} | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
18+
| v0.X.X | ❌{🐛🧓} | >= v7.2.0 | >= 14.15.0 | >= v6.14.8 |
2419

2520
## Report Vulnerability
2621

hugoalh.GitHubActionsToolkit/hugoalh.GitHubActionsToolkit.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RootModule = 'hugoalh.GitHubActionsToolkit.psm1'
44

55
# Version number of this module.
6-
ModuleVersion = '1.0.1'
6+
ModuleVersion = '1.0.2'
77

88
# Supported PSEditions
99
# CompatiblePSEditions = @()

hugoalh.GitHubActionsToolkit/module/nodejs-invoke.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Function Invoke-NodeJsWrapper {
3939
}
4040
[String]$ResultSeparator = "=====$(New-GitHubActionsRandomToken -Length 32)====="
4141
Try {
42-
[String[]]$Result = Invoke-Expression -Command "node --no-deprecation --no-warnings `"$($WrapperFullName -ireplace '\\', '/')`" `"$(
42+
[String[]]$Result = node --no-deprecation --no-warnings `"$($WrapperFullName -ireplace '\\', '/')`" `"$(
4343
$InputObject |
4444
ConvertTo-Json -Depth 100 -Compress
45-
)`" `"$ResultSeparator`""
45+
)`" `"$ResultSeparator`"
4646
[UInt32]$ResultSkipIndex = @()
4747
For ([UInt32]$ResultIndex = 0; $ResultIndex -ilt $Result.Count; $ResultIndex++) {
4848
[String]$Item = $Result[$ResultIndex]

hugoalh.GitHubActionsToolkit/module/nodejs-test.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Function Test-NodeJsEnvironment {
3535
Write-Verbose -Message 'Test NodeJS.'
3636
Get-Command -Name 'node' -CommandType 'Application' -ErrorAction 'Stop' |# `Get-Command` will throw error when nothing is found.
3737
Out-Null# No need the result.
38-
[String]$GetNodeJsVersionRawResult = Invoke-Expression -Command 'node --no-deprecation --no-warnings --version' |
38+
[String]$GetNodeJsVersionRawResult = node --no-deprecation --no-warnings --version |
3939
Join-String -Separator "`n"
4040
If (
4141
$GetNodeJsVersionRawResult -inotmatch $SemVerRegEx -or
@@ -46,7 +46,7 @@ Function Test-NodeJsEnvironment {
4646
Write-Verbose -Message 'Test NPM.'
4747
Get-Command -Name 'npm' -CommandType 'Application' -ErrorAction 'Stop' |# `Get-Command` will throw error when nothing is found.
4848
Out-Null# No need the result.
49-
[String[]]$GetNpmVersionRawResult = Invoke-Expression -Command 'npm --version'# NPM sometimes display other useless things which unable to suppress.
49+
[String[]]$GetNpmVersionRawResult = npm --version# NPM sometimes display other useless things which unable to suppress.
5050
If (
5151
$GetNpmVersionRawResult -inotmatch $SemVerRegEx -or
5252
$NpmMinimumVersion -igt [SemVer]::Parse(($Matches[0] -ireplace '^v', ''))
@@ -67,12 +67,12 @@ Function Test-NodeJsEnvironment {
6767
If (
6868
$ReinstallDependencies.IsPresent -or
6969
(
70-
[String[]](Invoke-Expression -Command 'npm outdated') |
70+
npm outdated |
7171
Join-String -Separator "`n"
7272
) -cmatch 'MISSING'
7373
) {
7474
Write-Verbose -Message 'Install/Reinstall NodeJS wrapper API dependencies.'
75-
Invoke-Expression -Command 'npm ci --no-audit --no-fund' |
75+
npm ci --no-audit --no-fund |
7676
Out-Null# No need the result.
7777
If ($LASTEXITCODE -ine 0) {
7878
Throw

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/artifact/download-all.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ for (let item of result) {
1313
Name: item.artifactName,
1414
Path: item.downloadPath
1515
});
16-
};
16+
}
1717
console.log(JSON.stringify(outputObject));
1818
process.exit(0);

0 commit comments

Comments
 (0)