-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from step-security/release
chore: initial release
- Loading branch information
Showing
26 changed files
with
238,494 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.js,*.ts] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
tab_width = 4 | ||
|
||
[*.gitattributes] | ||
indent_style = tab | ||
tab_width = 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
/dist/index.js binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release GitHub Actions | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "Tag for the release" | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
actions: read | ||
id-token: write | ||
contents: write | ||
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1 | ||
with: | ||
tag: "${{ github.event.inputs.tag }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
name: Test Action | ||
|
||
on: | ||
- push | ||
- pull_request | ||
- workflow_dispatch | ||
|
||
jobs: | ||
test_default_inputs: | ||
name: Test with default inputs | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pnpm: | ||
- 4.11.1 | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run the action | ||
uses: ./ | ||
with: | ||
version: 4.11.1 | ||
|
||
- name: 'Test: which' | ||
run: which pnpm; which pnpx | ||
|
||
- name: 'Test: install' | ||
run: pnpm install | ||
|
||
test_dest: | ||
name: Test with dest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pnpm: | ||
- 4.11.1 | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run the action | ||
uses: ./ | ||
with: | ||
version: 4.11.1 | ||
dest: ~/test/pnpm | ||
|
||
- name: 'Test: which' | ||
run: which pnpm && which pnpx | ||
|
||
- name: 'Test: install' | ||
run: pnpm install | ||
|
||
test_standalone: | ||
name: Test with standalone | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
standalone: | ||
- true | ||
- false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run the action | ||
uses: ./ | ||
with: | ||
version: 7.0.0 | ||
standalone: ${{ matrix.standalone }} | ||
|
||
- name: install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
# [email protected] is not compatible with Node.js 12 | ||
node-version: 20 | ||
|
||
- name: 'Test: which (pnpm)' | ||
run: which pnpm | ||
|
||
- name: 'Test: which (pnpx)' | ||
if: matrix.standalone == false | ||
run: which pnpx | ||
|
||
- name: 'Test: install when standalone is true' | ||
if: matrix.standalone | ||
run: pnpm install | ||
|
||
- name: 'Test: install when standalone is false' | ||
if: matrix.standalone == false | ||
# Since the default shell on windows runner is pwsh, we specify bash explicitly | ||
shell: bash | ||
run: | | ||
if pnpm install; then | ||
echo "pnpm install should fail" | ||
exit 1 | ||
else | ||
echo "pnpm install failed as expected" | ||
fi | ||
test_run_install: | ||
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})' | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pnpm: | ||
- 4.11.1 | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
run_install: | ||
- name: 'null' | ||
value: 'null' | ||
- name: 'empty object' | ||
value: '{}' | ||
- name: 'recursive' | ||
value: | | ||
recursive: true | ||
- name: 'global' | ||
value: | | ||
args: | ||
- --global | ||
- --global-dir=./pnpm-global | ||
- npm | ||
- yarn | ||
- pnpm | ||
- name: 'array' | ||
value: | | ||
- {} | ||
- recursive: true | ||
- args: | ||
- --global | ||
- --global-dir=./pnpm-global | ||
- npm | ||
- yarn | ||
- pnpm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run the action | ||
uses: ./ | ||
with: | ||
version: 4.11.1 | ||
run_install: ${{ matrix.run_install.value }} | ||
|
||
- name: 'Test: which' | ||
run: which pnpm; which pnpx | ||
|
||
- name: 'Test: install' | ||
run: pnpm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules | ||
*.log | ||
/dist/* | ||
!/dist/index.js | ||
!/dist/pnpm.cjs | ||
!/dist/worker.js | ||
tmp | ||
temp | ||
*.tmp | ||
*.temp | ||
tmp.* | ||
temp.* | ||
.pnpm-store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2023 StepSecurity | ||
Copyright © 2020 Hoàng Văn Khải | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Oops, something went wrong.