mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2026-04-17 03:52:59 -06:00
Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc45e9126 | ||
|
|
9465f624dd | ||
|
|
9eba60dcc9 | ||
|
|
4fd68cb082 | ||
|
|
81a846ee13 | ||
|
|
6abbb7ec37 | ||
|
|
54c2561f69 | ||
|
|
d280f9562f | ||
|
|
4d946a7137 | ||
|
|
fbfc4f37fe | ||
|
|
ff4a15c5a4 | ||
|
|
392f94885d | ||
|
|
deed33da1f | ||
|
|
e74668b8fe | ||
|
|
89f782418b | ||
|
|
91dad0f873 | ||
|
|
d021f9b324 | ||
|
|
d3616beaf8 | ||
|
|
1d4b28a26b | ||
|
|
45272fece1 | ||
|
|
5ab3223647 | ||
|
|
349653b2d1 | ||
|
|
2409e442cb | ||
|
|
d91472faac | ||
|
|
fd0d6460ff | ||
|
|
d19e416e3c | ||
|
|
85eb57b388 | ||
|
|
71ca9e0465 | ||
|
|
db3a3050f2 | ||
|
|
e85fa95304 | ||
|
|
36e0037c79 | ||
|
|
82c927c412 | ||
|
|
da2853e8b5 | ||
|
|
1d17dec12c | ||
|
|
c619ac25e7 | ||
|
|
b8d61b28e9 | ||
|
|
217a1bd1f9 | ||
|
|
f7e908e5b9 | ||
|
|
84033c6664 | ||
|
|
15e7963e05 | ||
|
|
754ef232a0 | ||
|
|
dbf74e34eb | ||
|
|
918a9dd3cd | ||
|
|
48ab6ba97a | ||
|
|
24851354e2 | ||
|
|
97d457995a | ||
|
|
aa4e82eb0f | ||
|
|
34f1525686 | ||
|
|
ceda108afe | ||
|
|
7fdadc3d8b | ||
|
|
bc2a7f0205 | ||
|
|
76aba877ac | ||
|
|
d43ef3b8fc | ||
|
|
663f81ff55 | ||
|
|
0ecb9bbbf3 | ||
|
|
d9dbb9c3ca | ||
|
|
2034dbc765 | ||
|
|
2b3459b026 | ||
|
|
76c12355bd | ||
|
|
c544706a19 | ||
|
|
c26e09cbb4 | ||
|
|
4c84b78119 | ||
|
|
66ae810f53 | ||
|
|
6f73f46fce | ||
|
|
99ca5b010b | ||
|
|
04c1b0be04 | ||
|
|
ce00daae27 | ||
|
|
7648f29744 | ||
|
|
7d4b8f5604 | ||
|
|
a584dfa158 | ||
|
|
001bed2881 | ||
|
|
4cd391c02d | ||
|
|
39152071b7 | ||
|
|
cd7336ce6f | ||
|
|
9a5a78f329 |
@@ -1,2 +1,12 @@
|
|||||||
/coverage
|
/coverage
|
||||||
/node_modules
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|||||||
3
.eslintignore
Normal file
3
.eslintignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/dist/**
|
||||||
|
/coverage/**
|
||||||
|
/node_modules/**
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"node": true,
|
"node": true,
|
||||||
"es2021": true,
|
"es6": true,
|
||||||
"jest/globals": true
|
"jest": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:jest/recommended",
|
"plugin:jest/recommended",
|
||||||
"plugin:prettier/recommended"
|
"plugin:prettier/recommended"
|
||||||
|
|||||||
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,2 +1,4 @@
|
|||||||
|
/.yarn/releases/** binary
|
||||||
|
/.yarn/plugins/** binary
|
||||||
/dist/** linguist-generated=true
|
/dist/** linguist-generated=true
|
||||||
/lib/** linguist-generated=true
|
/lib/** linguist-generated=true
|
||||||
|
|||||||
101
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
101
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||||
|
name: Bug Report
|
||||||
|
description: Report a bug
|
||||||
|
labels:
|
||||||
|
- kind/bug
|
||||||
|
- status/triage
|
||||||
|
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Support guidelines
|
||||||
|
description: Please read the support guidelines before proceeding.
|
||||||
|
options:
|
||||||
|
- label: I've read the [support guidelines](https://github.com/crazy-max/ghaction-upx/blob/master/.github/SUPPORT.md)
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: I've found a bug and checked that ...
|
||||||
|
description: |
|
||||||
|
Make sure that your request fulfills all of the following requirements. If one requirement cannot be satisfied, explain in detail why.
|
||||||
|
options:
|
||||||
|
- label: ... the documentation does not mention anything about my problem
|
||||||
|
- label: ... there are no open or closed issues that are related to my problem
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: |
|
||||||
|
Please provide a brief description of the bug in 1-2 sentences.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Expected behaviour
|
||||||
|
description: |
|
||||||
|
Please describe precisely what you'd expect to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Actual behaviour
|
||||||
|
description: |
|
||||||
|
Please describe precisely what is actually happening.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: |
|
||||||
|
Please describe the steps to reproduce the bug.
|
||||||
|
placeholder: |
|
||||||
|
1. ...
|
||||||
|
2. ...
|
||||||
|
3. ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Repository URL
|
||||||
|
description: >
|
||||||
|
Enter the URL of the repository where you are experiencing the
|
||||||
|
issue. If your repository is private, provide a link to a minimal
|
||||||
|
repository that reproduces the issue.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Workflow run URL
|
||||||
|
description: >
|
||||||
|
Enter the URL of the GitHub Action workflow run that fails (e.g.
|
||||||
|
`https://github.com/<user>/<repo>/actions/runs/<id>`)
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: YAML workflow
|
||||||
|
description: |
|
||||||
|
Provide the YAML of the workflow that's causing the issue.
|
||||||
|
Make sure to remove any sensitive information.
|
||||||
|
render: yaml
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Workflow logs
|
||||||
|
description: >
|
||||||
|
[Attach](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files)
|
||||||
|
the [log file of your workflow run](https://docs.github.com/en/actions/managing-workflow-runs/using-workflow-run-logs#downloading-logs)
|
||||||
|
and make sure to remove any sensitive information.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional info
|
||||||
|
description: |
|
||||||
|
Please provide any additional information that seem useful.
|
||||||
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
---
|
|
||||||
|
|
||||||
### Behaviour
|
|
||||||
|
|
||||||
#### Steps to reproduce this issue
|
|
||||||
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
#### Expected behaviour
|
|
||||||
|
|
||||||
> Tell me what should happen
|
|
||||||
|
|
||||||
#### Actual behaviour
|
|
||||||
|
|
||||||
> Tell me what happens instead
|
|
||||||
|
|
||||||
### Configuration
|
|
||||||
|
|
||||||
* Repository URL (if public):
|
|
||||||
* Build URL (if public):
|
|
||||||
|
|
||||||
```yml
|
|
||||||
# paste your YAML workflow file here and remove sensitive data
|
|
||||||
```
|
|
||||||
|
|
||||||
### Logs
|
|
||||||
|
|
||||||
> Download the [log file of your build](https://docs.github.com/en/actions/managing-workflow-runs/using-workflow-run-logs#downloading-logs)
|
|
||||||
> and [attach it](https://docs.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests) to this issue.
|
|
||||||
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
|
||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: Questions and Discussions
|
||||||
|
url: https://github.com/crazy-max/ghaction-upx/discussions/new
|
||||||
|
about: Use Github Discussions to ask questions and/or open discussion topics.
|
||||||
15
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
15
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||||
|
name: Feature request
|
||||||
|
description: Missing functionality? Come tell us about it!
|
||||||
|
labels:
|
||||||
|
- kind/enhancement
|
||||||
|
- status/triage
|
||||||
|
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: What is the feature you want to see?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@@ -4,19 +4,16 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "06:00"
|
|
||||||
timezone: "Europe/Paris"
|
|
||||||
labels:
|
labels:
|
||||||
- ":game_die: dependencies"
|
- "kind/dependencies"
|
||||||
- ":robot: bot"
|
- "bot"
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "06:00"
|
versioning-strategy: "increase"
|
||||||
timezone: "Europe/Paris"
|
|
||||||
allow:
|
allow:
|
||||||
- dependency-type: "production"
|
- dependency-type: "production"
|
||||||
labels:
|
labels:
|
||||||
- ":game_die: dependencies"
|
- "kind/dependencies"
|
||||||
- ":robot: bot"
|
- "bot"
|
||||||
|
|||||||
128
.github/labels.yml
vendored
128
.github/labels.yml
vendored
@@ -1,85 +1,69 @@
|
|||||||
## more info https://github.com/crazy-max/ghaction-github-labeler
|
## more info https://github.com/crazy-max/ghaction-github-labeler
|
||||||
- # automerge
|
-
|
||||||
name: ":bell: automerge"
|
name: "bot"
|
||||||
color: "8f4fbc"
|
|
||||||
description: ""
|
|
||||||
- # bot
|
|
||||||
name: ":robot: bot"
|
|
||||||
color: "69cde9"
|
color: "69cde9"
|
||||||
description: ""
|
description: ""
|
||||||
- # bug
|
-
|
||||||
name: ":bug: bug"
|
name: "good first issue"
|
||||||
color: "b60205"
|
|
||||||
description: ""
|
|
||||||
- # dependencies
|
|
||||||
name: ":game_die: dependencies"
|
|
||||||
color: "0366d6"
|
|
||||||
description: ""
|
|
||||||
- # documentation
|
|
||||||
name: ":memo: documentation"
|
|
||||||
color: "c5def5"
|
|
||||||
description: ""
|
|
||||||
- # duplicate
|
|
||||||
name: ":busts_in_silhouette: duplicate"
|
|
||||||
color: "cccccc"
|
|
||||||
description: ""
|
|
||||||
- # enhancement
|
|
||||||
name: ":sparkles: enhancement"
|
|
||||||
color: "0054ca"
|
|
||||||
description: ""
|
|
||||||
- # feature request
|
|
||||||
name: ":bulb: feature request"
|
|
||||||
color: "0e8a16"
|
|
||||||
description: ""
|
|
||||||
- # feedback
|
|
||||||
name: ":mega: feedback"
|
|
||||||
color: "03a9f4"
|
|
||||||
description: ""
|
|
||||||
- # future maybe
|
|
||||||
name: ":rocket: future maybe"
|
|
||||||
color: "fef2c0"
|
|
||||||
description: ""
|
|
||||||
- # good first issue
|
|
||||||
name: ":hatching_chick: good first issue"
|
|
||||||
color: "7057ff"
|
color: "7057ff"
|
||||||
description: ""
|
description: ""
|
||||||
- # help wanted
|
-
|
||||||
name: ":pray: help wanted"
|
name: "help wanted"
|
||||||
color: "4caf50"
|
color: "4caf50"
|
||||||
description: ""
|
description: ""
|
||||||
- # invalid
|
-
|
||||||
name: ":no_entry_sign: invalid"
|
name: "area/ci"
|
||||||
|
color: "ed9ca9"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/bug"
|
||||||
|
color: "b60205"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/dependencies"
|
||||||
|
color: "0366d6"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/docs"
|
||||||
|
color: "c5def5"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/duplicate"
|
||||||
|
color: "cccccc"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/enhancement"
|
||||||
|
color: "0054ca"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "kind/invalid"
|
||||||
color: "e6e6e6"
|
color: "e6e6e6"
|
||||||
description: ""
|
description: ""
|
||||||
- # investigate
|
-
|
||||||
name: ":mag: investigate"
|
name: "kind/upstream"
|
||||||
color: "e6625b"
|
|
||||||
description: ""
|
|
||||||
- # needs more info
|
|
||||||
name: ":thinking: needs more info"
|
|
||||||
color: "795548"
|
|
||||||
description: ""
|
|
||||||
- # pinned
|
|
||||||
name: ":pushpin: pinned"
|
|
||||||
color: "28008e"
|
|
||||||
description: ""
|
|
||||||
- # question
|
|
||||||
name: ":question: question"
|
|
||||||
color: "3f51b5"
|
|
||||||
description: ""
|
|
||||||
- # sponsor
|
|
||||||
name: ":sparkling_heart: sponsor"
|
|
||||||
color: "fedbf0"
|
|
||||||
description: ""
|
|
||||||
- # stale
|
|
||||||
name: ":skull: stale"
|
|
||||||
color: "237da0"
|
|
||||||
description: ""
|
|
||||||
- # upstream
|
|
||||||
name: ":eyes: upstream"
|
|
||||||
color: "fbca04"
|
color: "fbca04"
|
||||||
description: ""
|
description: ""
|
||||||
- # wontfix
|
-
|
||||||
name: ":coffin: wontfix"
|
name: "kind/wontfix"
|
||||||
color: "ffffff"
|
color: "ffffff"
|
||||||
description: ""
|
description: ""
|
||||||
|
-
|
||||||
|
name: "status/automerge"
|
||||||
|
color: "8f4fbc"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "status/needs-investigation"
|
||||||
|
color: "e6625b"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "status/needs-more-info"
|
||||||
|
color: "795548"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "status/stale"
|
||||||
|
color: "237da0"
|
||||||
|
description: ""
|
||||||
|
-
|
||||||
|
name: "status/triage"
|
||||||
|
color: "dde4b7"
|
||||||
|
description: ""
|
||||||
|
|||||||
224
.github/upx-releases.json
vendored
Normal file
224
.github/upx-releases.json
vendored
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
{
|
||||||
|
"latest": {
|
||||||
|
"id": 115584145,
|
||||||
|
"tag_name": "v4.1.0",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v4.1.0",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v4.1.0": {
|
||||||
|
"id": 115584145,
|
||||||
|
"tag_name": "v4.1.0",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v4.1.0",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v4.0.2": {
|
||||||
|
"id": 90665948,
|
||||||
|
"tag_name": "v4.0.2",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v4.0.2",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v4.0.1": {
|
||||||
|
"id": 83324543,
|
||||||
|
"tag_name": "v4.0.1",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v4.0.1",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v4.0.0": {
|
||||||
|
"id": 81373677,
|
||||||
|
"tag_name": "v4.0.0",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v4.0.0",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.99": {
|
||||||
|
"id": 81217748,
|
||||||
|
"tag_name": "v3.99",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.99",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.99/upx-3.99-src.tar.xz"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.96": {
|
||||||
|
"id": 23054413,
|
||||||
|
"tag_name": "v3.96",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.96",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.95": {
|
||||||
|
"id": 12577195,
|
||||||
|
"tag_name": "v3.95",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.95",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-arm64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-arm_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-dos.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-mips_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-powerpc64le_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-win32.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.95/upx-3.95-win64.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.94": {
|
||||||
|
"id": 6366171,
|
||||||
|
"tag_name": "v3.94",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.94",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx-3.94-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx394a.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx394d.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx394w.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.94/upx394wce.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.93": {
|
||||||
|
"id": 5296538,
|
||||||
|
"tag_name": "v3.93",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.93",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx-3.93-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx393a.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx393d.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx393w.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.93/upx393wce.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.92": {
|
||||||
|
"id": 4888235,
|
||||||
|
"tag_name": "v3.92",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.92",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-amd64_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-armeb_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-i386_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-mipsel_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-powerpc_linux.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx-3.92-src.tar.xz",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx392a.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx392d.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx392w.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.92/upx392wce.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.91": {
|
||||||
|
"id": 4087014,
|
||||||
|
"tag_name": "v3.91",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.91",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-amd64_linux.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-armeb_linux.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-i386_linux.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-mipsel_linux.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-powerpc_linux.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx-3.91-src.tar.bz2",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx391a.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx391d.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx391w.zip",
|
||||||
|
"https://github.com/upx/upx/releases/download/v3.91/upx391wce.zip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v3.00": {
|
||||||
|
"id": 4258222,
|
||||||
|
"tag_name": "v3.00",
|
||||||
|
"html_url": "https://github.com/upx/upx/releases/tag/v3.00",
|
||||||
|
"assets": []
|
||||||
|
}
|
||||||
|
}
|
||||||
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@@ -1,8 +1,12 @@
|
|||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 10 * * *' # everyday at 10am
|
- cron: '0 10 * * *'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
@@ -10,9 +14,8 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
paths-ignore:
|
||||||
- 'master'
|
- '.github/upx-releases.json'
|
||||||
- 'releases/v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
@@ -29,7 +32,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
-
|
-
|
||||||
name: Download files
|
name: Download files
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -51,3 +54,30 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
./bin/firefox-history-merger*
|
./bin/firefox-history-merger*
|
||||||
args: -fq
|
args: -fq
|
||||||
|
|
||||||
|
install-only:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
version:
|
||||||
|
- latest
|
||||||
|
- v4.0.2
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: UPX
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
install-only: true
|
||||||
|
-
|
||||||
|
name: Verify
|
||||||
|
run: |
|
||||||
|
which upx
|
||||||
|
upx --version
|
||||||
|
|||||||
12
.github/workflows/labels.yml
vendored
12
.github/workflows/labels.yml
vendored
@@ -1,5 +1,9 @@
|
|||||||
name: labels
|
name: labels
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -7,6 +11,10 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- '.github/labels.yml'
|
- '.github/labels.yml'
|
||||||
- '.github/workflows/labels.yml'
|
- '.github/workflows/labels.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/labels.yml'
|
||||||
|
- '.github/workflows/labels.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
labeler:
|
labeler:
|
||||||
@@ -14,7 +22,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
-
|
-
|
||||||
name: Run Labeler
|
name: Run Labeler
|
||||||
uses: crazy-max/ghaction-github-labeler@v4
|
uses: crazy-max/ghaction-github-labeler@v4
|
||||||
|
with:
|
||||||
|
dry-run: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|||||||
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
@@ -1,14 +1,17 @@
|
|||||||
name: test
|
name: test
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'releases/v*'
|
- 'releases/v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
paths-ignore:
|
||||||
- 'master'
|
- '.github/upx-releases.json'
|
||||||
- 'releases/v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -16,15 +19,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
-
|
|
||||||
name: Validate
|
|
||||||
uses: docker/bake-action@v2
|
|
||||||
with:
|
|
||||||
targets: validate
|
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
uses: docker/bake-action@v2
|
uses: docker/bake-action@v3
|
||||||
with:
|
with:
|
||||||
targets: test
|
targets: test
|
||||||
-
|
-
|
||||||
|
|||||||
58
.github/workflows/upx-releases-json.yml
vendored
Normal file
58
.github/workflows/upx-releases-json.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: upx-releases-json
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 */12 * * *'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '.github/upx-releases.json'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate:
|
||||||
|
uses: crazy-max/.github/.github/workflows/releases-json.yml@6dc31870ca6c4f8489bf5a408ab38fae60f47eec
|
||||||
|
with:
|
||||||
|
repository: upx/upx
|
||||||
|
artifact_name: upx-releases-json
|
||||||
|
filename: upx-releases.json
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
open-pr:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
needs:
|
||||||
|
- generate
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: Download
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: upx-releases-json
|
||||||
|
path: .github
|
||||||
|
-
|
||||||
|
name: Commit changes
|
||||||
|
run: |
|
||||||
|
git add -A .
|
||||||
|
-
|
||||||
|
name: Create PR
|
||||||
|
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
|
||||||
|
with:
|
||||||
|
base: master
|
||||||
|
branch: bot/upx-releases-json
|
||||||
|
commit-message: "update .github/upx-releases.json"
|
||||||
|
signoff: true
|
||||||
|
delete-branch: true
|
||||||
|
title: "Update `.github/upx-releases.json`"
|
||||||
|
body: |
|
||||||
|
Update `.github/upx-releases.json` to keep in sync with [https://github.com/upx/upx](https://github.com/upx/upx).
|
||||||
|
draft: false
|
||||||
45
.github/workflows/validate.yml
vendored
Normal file
45
.github/workflows/validate.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: validate
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'releases/v*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
targets: ${{ steps.targets.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Targets matrix
|
||||||
|
id: targets
|
||||||
|
run: |
|
||||||
|
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
validate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- prepare
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target: ${{ fromJson(needs.prepare.outputs.targets) }}
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Validate
|
||||||
|
uses: docker/bake-action@v3
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
71
.gitignore
vendored
71
.gitignore
vendored
@@ -1,12 +1,5 @@
|
|||||||
/.dev
|
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
|
||||||
node_modules/
|
|
||||||
lib
|
|
||||||
|
|
||||||
# Jetbrains
|
|
||||||
/.idea
|
|
||||||
/*.iml
|
|
||||||
|
|
||||||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
@@ -14,6 +7,7 @@ npm-debug.log*
|
|||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
@@ -24,34 +18,14 @@ pids
|
|||||||
*.seed
|
*.seed
|
||||||
*.pid.lock
|
*.pid.lock
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
*.lcov
|
*.lcov
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# TypeScript cache
|
# TypeScript cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
@@ -61,36 +35,19 @@ typings/
|
|||||||
# Optional eslint cache
|
# Optional eslint cache
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
# Yarn Integrity file
|
||||||
.yarn-integrity
|
.yarn-integrity
|
||||||
|
|
||||||
# dotenv environment variables file
|
# dotenv environment variable files
|
||||||
.env
|
.env
|
||||||
.env.test
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
# yarn v2
|
||||||
.cache
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
# next.js build output
|
.yarn/build-state.yml
|
||||||
.next
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless/
|
|
||||||
|
|
||||||
# FuseBox cache
|
|
||||||
.fusebox/
|
|
||||||
|
|
||||||
# DynamoDB Local files
|
|
||||||
.dynamodb/
|
|
||||||
|
|||||||
6
.prettierignore
Normal file
6
.prettierignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/
|
||||||
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
874
.yarn/releases/yarn-3.6.3.cjs
vendored
Normal file
874
.yarn/releases/yarn-3.6.3.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
15
.yarnrc.yml
Normal file
15
.yarnrc.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
logFilters:
|
||||||
|
- code: YN0013
|
||||||
|
level: discard
|
||||||
|
- code: YN0019
|
||||||
|
level: discard
|
||||||
|
- code: YN0076
|
||||||
|
level: discard
|
||||||
|
|
||||||
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||||
|
spec: "@yarnpkg/plugin-interactive-tools"
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-3.6.3.cjs
|
||||||
60
CHANGELOG.md
60
CHANGELOG.md
@@ -1,60 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## 2.0.0 (2022/05/26)
|
|
||||||
|
|
||||||
* Node 16 as default runtime (#169)
|
|
||||||
* This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.285.0) version of v2.285.0, which is by default available in GHES 3.4 or later.
|
|
||||||
|
|
||||||
## 1.5.0 (2022/05/26)
|
|
||||||
|
|
||||||
* Update dev dependencies and workflow (#168)
|
|
||||||
* Bump @actions/core from 1.2.6 to 1.6.0 (#142 #158 #161)
|
|
||||||
* Bump @actions/exec from 1.0.4 to 1.1.1 (#152 #164)
|
|
||||||
* Bump @actions/tool-cache from 1.6.1 to 1.7.2 (#151 #165)
|
|
||||||
* Bump minimist from 1.2.5 to 1.2.6 (#166)
|
|
||||||
* Bump ansi-regex from 5.0.0 to 5.0.1 (#160)
|
|
||||||
* Bump tmpl from 1.0.4 to 1.0.5 (#159)
|
|
||||||
* Bump path-parse from 1.0.6 to 1.0.7 (#157)
|
|
||||||
* Bump hosted-git-info from 2.8.8 to 2.8.9 (#154)
|
|
||||||
* Bump ws from 7.3.0 to 7.5.0 (#155)
|
|
||||||
* Bump lodash from 4.17.20 to 4.17.21 (#153)
|
|
||||||
* Bump y18n from 4.0.0 to 4.0.3 (#143)
|
|
||||||
|
|
||||||
## 1.4.0 (2021/03/27)
|
|
||||||
|
|
||||||
* Allow multiple files (#140)
|
|
||||||
* Container dev workflow (#139)
|
|
||||||
* Bump node-notifier from 8.0.0 to 8.0.1 (#135)
|
|
||||||
* Bump @actions/tool-cache from 1.6.0 to 1.6.1 (#134)
|
|
||||||
* Bump @actions/http-client from 1.0.8 to 1.0.11 (#131 #138)
|
|
||||||
|
|
||||||
## 1.3.3 (2020/10/01)
|
|
||||||
|
|
||||||
* Fix CVE-2020-15228
|
|
||||||
|
|
||||||
## 1.3.2 (2020/05/11)
|
|
||||||
|
|
||||||
* Update README
|
|
||||||
|
|
||||||
## 1.3.1 (2020/05/07)
|
|
||||||
|
|
||||||
* Code cleanup
|
|
||||||
|
|
||||||
## 1.3.0 (2020/05/06)
|
|
||||||
|
|
||||||
* Use native tools
|
|
||||||
* Add Codecov
|
|
||||||
* Update deps
|
|
||||||
|
|
||||||
## 1.2.0 (2020/04/09)
|
|
||||||
|
|
||||||
* Use ncc and clean workflows
|
|
||||||
* Update deps
|
|
||||||
|
|
||||||
## 1.1.0 (2020/01/17)
|
|
||||||
|
|
||||||
* Update deps
|
|
||||||
|
|
||||||
## 1.0.0 (2020/01/17)
|
|
||||||
|
|
||||||
* Initial version
|
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020-2022 CrazyMax
|
Copyright (c) 2020-2023 CrazyMax
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
34
README.md
34
README.md
@@ -1,6 +1,6 @@
|
|||||||
[](https://github.com/crazy-max/ghaction-upx/releases/latest)
|
[](https://github.com/crazy-max/ghaction-upx/releases/latest)
|
||||||
[](https://github.com/marketplace/actions/upx-github-action)
|
[](https://github.com/marketplace/actions/upx-github-action)
|
||||||
[](https://github.com/crazy-max/ghaction-upx/actions?workflow=test)
|
[](https://github.com/crazy-max/ghaction-upx/actions?workflow=test)
|
||||||
[](https://codecov.io/gh/crazy-max/ghaction-upx)
|
[](https://codecov.io/gh/crazy-max/ghaction-upx)
|
||||||
[](https://github.com/sponsors/crazy-max)
|
[](https://github.com/sponsors/crazy-max)
|
||||||
[](https://www.paypal.me/crazyws)
|
[](https://www.paypal.me/crazyws)
|
||||||
@@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
GitHub Action for [UPX](https://github.com/upx/upx), the Ultimate Packer for eXecutables.
|
GitHub Action for [UPX](https://github.com/upx/upx), the Ultimate Packer for eXecutables.
|
||||||
|
|
||||||
If you are interested, [check out](https://github.com/crazy-max?tab=repositories&q=ghaction&type=source&language=&sort=) my other :octocat: GitHub Actions!
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
___
|
___
|
||||||
@@ -47,6 +45,31 @@ jobs:
|
|||||||
args: -fq
|
args: -fq
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you just want to install UPX:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: upx
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upx:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Install UPX
|
||||||
|
uses: crazy-max/ghaction-upx@v2
|
||||||
|
with:
|
||||||
|
install-only: true
|
||||||
|
-
|
||||||
|
name: UPX version
|
||||||
|
run: upx --version
|
||||||
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
@@ -54,10 +77,11 @@ jobs:
|
|||||||
Following inputs can be used as `step.with` keys
|
Following inputs can be used as `step.with` keys
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|---------------|---------|-----------|---------------------------------|
|
|----------------|--------|----------|------------------------------------------------------------|
|
||||||
| `version` | String | `latest` | UPX version. Example: `v3.95` |
|
| `version` | String | `latest` | UPX version. Example: `v3.95` |
|
||||||
| `files` | String | | Newline-delimited list of path globs for files to compress (**required**) |
|
| `files` | String | | Newline-delimited list of path globs for files to compress |
|
||||||
| `args` | String | | Arguments to pass to UPX |
|
| `args` | String | | Arguments to pass to UPX |
|
||||||
|
| `install-only` | String | `false` | Just install UPX |
|
||||||
|
|
||||||
## Limitation
|
## Limitation
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import {describe, expect, it} from '@jest/globals';
|
|
||||||
import * as github from '../src/github';
|
|
||||||
|
|
||||||
describe('github', () => {
|
|
||||||
it('returns latest UPX GitHub release', async () => {
|
|
||||||
const release = await github.getRelease('latest');
|
|
||||||
expect(release).not.toBeNull();
|
|
||||||
expect(release?.tag_name).not.toEqual('');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('returns v3.96 GoReleaser GitHub release', async () => {
|
|
||||||
const release = await github.getRelease('v3.96');
|
|
||||||
expect(release).not.toBeNull();
|
|
||||||
expect(release?.tag_name).toEqual('v3.96');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -2,6 +2,30 @@ import {describe, expect, it} from '@jest/globals';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as installer from '../src/installer';
|
import * as installer from '../src/installer';
|
||||||
|
|
||||||
|
describe('getRelease', () => {
|
||||||
|
it('returns latest UPX GitHub release', async () => {
|
||||||
|
const release = await installer.getRelease('latest');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).not.toEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns v3.95 UPX GitHub release', async () => {
|
||||||
|
const release = await installer.getRelease('v3.95');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.id).toEqual(12577195);
|
||||||
|
expect(release?.tag_name).toEqual('v3.95');
|
||||||
|
expect(release?.html_url).toEqual('https://github.com/upx/upx/releases/tag/v3.95');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('unknown release', async () => {
|
||||||
|
await expect(installer.getRelease('foo')).rejects.toThrow(
|
||||||
|
new Error(
|
||||||
|
'Cannot find UPX release foo in https://raw.githubusercontent.com/crazy-max/ghaction-upx/master/.github/upx-releases.json'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('installer', () => {
|
describe('installer', () => {
|
||||||
it('acquires v3.95 version of UPX', async () => {
|
it('acquires v3.95 version of UPX', async () => {
|
||||||
const upx = await installer.getUPX('v3.95');
|
const upx = await installer.getUPX('v3.95');
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ inputs:
|
|||||||
deprecationMessage: 'file is deprecated. Please use files input instead.'
|
deprecationMessage: 'file is deprecated. Please use files input instead.'
|
||||||
description: 'File to compress'
|
description: 'File to compress'
|
||||||
required: false
|
required: false
|
||||||
|
install-only:
|
||||||
|
description: 'Just install upx'
|
||||||
|
default: 'false'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
comment: false
|
comment: false
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project: # settings affecting project coverage
|
||||||
|
default:
|
||||||
|
target: auto # auto % coverage target
|
||||||
|
threshold: 5% # allow for 5% reduction of coverage without failing
|
||||||
|
patch: off
|
||||||
|
|
||||||
github_checks:
|
github_checks:
|
||||||
annotations: false
|
annotations: false
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG NODE_VERSION=16
|
ARG NODE_VERSION=20
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
FROM node:${NODE_VERSION}-alpine AS base
|
||||||
RUN apk add --no-cache cpio findutils git
|
RUN apk add --no-cache cpio findutils git
|
||||||
|
RUN yarn config set --home enableTelemetry 0
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ EOT
|
|||||||
|
|
||||||
FROM deps AS build
|
FROM deps AS build
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run build && mkdir /out && cp -Rf dist /out/
|
yarn run build && mkdir /out && cp -Rf dist /out/
|
||||||
|
|
||||||
@@ -48,6 +51,7 @@ EOT
|
|||||||
|
|
||||||
FROM deps AS format
|
FROM deps AS format
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run format \
|
yarn run format \
|
||||||
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
|
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
|
||||||
@@ -57,6 +61,7 @@ COPY --from=format /out /
|
|||||||
|
|
||||||
FROM deps AS lint
|
FROM deps AS lint
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run lint
|
yarn run lint
|
||||||
|
|
||||||
@@ -64,8 +69,9 @@ FROM deps AS test
|
|||||||
ENV RUNNER_TEMP=/tmp/github_runner
|
ENV RUNNER_TEMP=/tmp/github_runner
|
||||||
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run test --coverageDirectory=/tmp/coverage
|
yarn run test --coverage --coverageDirectory=/tmp/coverage
|
||||||
|
|
||||||
FROM scratch AS test-coverage
|
FROM scratch AS test-coverage
|
||||||
COPY --from=test /tmp/coverage /
|
COPY --from=test /tmp/coverage /
|
||||||
|
|||||||
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
|
testEnvironment: 'node',
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': 'ts-jest'
|
||||||
},
|
},
|
||||||
|
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
|
||||||
|
coveragePathIgnorePatterns: ['dist/', 'node_modules/', '__tests__/'],
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|||||||
39
package.json
39
package.json
@@ -4,9 +4,13 @@
|
|||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
|
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
|
||||||
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
|
"lint": "yarn run prettier && yarn run eslint",
|
||||||
"format": "eslint --fix src/**/*.ts __tests__/**/*.ts",
|
"format": "yarn run prettier:fix && yarn run eslint:fix",
|
||||||
"test": "jest --coverage",
|
"eslint": "eslint --max-warnings=0 .",
|
||||||
|
"eslint:fix": "eslint --fix .",
|
||||||
|
"prettier": "prettier --check \"./**/*.ts\"",
|
||||||
|
"prettier:fix": "prettier --write \"./**/*.ts\"",
|
||||||
|
"test": "jest",
|
||||||
"all": "yarn run build && yarn run format && yarn test"
|
"all": "yarn run build && yarn run format && yarn test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -19,25 +23,26 @@
|
|||||||
],
|
],
|
||||||
"author": "CrazyMax",
|
"author": "CrazyMax",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"packageManager": "yarn@3.6.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.1.1",
|
||||||
"@actions/tool-cache": "^2.0.1"
|
"@actions/tool-cache": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.11.26",
|
"@types/node": "^20.6.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
||||||
"@typescript-eslint/parser": "^5.14.0",
|
"@typescript-eslint/parser": "^6.6.0",
|
||||||
"@vercel/ncc": "^0.33.3",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.49.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-plugin-jest": "^26.1.1",
|
"eslint-plugin-jest": "^27.2.3",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"jest": "^27.2.5",
|
"jest": "^29.6.4",
|
||||||
"prettier": "^2.3.1",
|
"prettier": "^3.0.3",
|
||||||
"ts-jest": "^27.1.2",
|
"ts-jest": "^29.1.1",
|
||||||
"ts-node": "^10.7.0",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.4.4"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,15 @@ export interface Inputs {
|
|||||||
version: string;
|
version: string;
|
||||||
files: string[];
|
files: string[];
|
||||||
args: string;
|
args: string;
|
||||||
|
installOnly: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
return {
|
return {
|
||||||
version: core.getInput('version') || 'latest',
|
version: core.getInput('version') || 'latest',
|
||||||
files: getInputList(core.getInput('files') || core.getInput('file'), true),
|
files: getInputList(core.getInput('files') || core.getInput('file'), true),
|
||||||
args: core.getInput('args')
|
args: core.getInput('args'),
|
||||||
|
installOnly: core.getBooleanInput('install-only')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import * as httpm from '@actions/http-client';
|
|
||||||
|
|
||||||
export interface GitHubRelease {
|
|
||||||
id: number;
|
|
||||||
tag_name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getRelease = async (version: string): Promise<GitHubRelease | null> => {
|
|
||||||
const url = `https://github.com/upx/upx/releases/${version}`;
|
|
||||||
const http: httpm.HttpClient = new httpm.HttpClient('ghaction-upx');
|
|
||||||
return (await http.getJson<GitHubRelease>(url)).result;
|
|
||||||
};
|
|
||||||
@@ -1,22 +1,40 @@
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as util from 'util';
|
import * as util from 'util';
|
||||||
import * as github from './github';
|
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import * as httpm from '@actions/http-client';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
|
|
||||||
const osPlat: string = os.platform();
|
const osPlat: string = os.platform();
|
||||||
const osArch: string = os.arch();
|
const osArch: string = os.arch();
|
||||||
|
|
||||||
export async function getUPX(version: string): Promise<string> {
|
export interface GitHubRelease {
|
||||||
core.startGroup(`Checking UPX ${version} release...`);
|
id: number;
|
||||||
const release: github.GitHubRelease | null = await github.getRelease(version);
|
tag_name: string;
|
||||||
if (!release) {
|
html_url: string;
|
||||||
throw new Error(`Cannot find UPX ${version} release`);
|
assets: Array<string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getRelease = async (version: string): Promise<GitHubRelease> => {
|
||||||
|
const url = `https://raw.githubusercontent.com/crazy-max/ghaction-upx/master/.github/upx-releases.json`;
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('ghaction-upx');
|
||||||
|
const resp: httpm.HttpClientResponse = await http.get(url);
|
||||||
|
const body = await resp.readBody();
|
||||||
|
const statusCode = resp.message.statusCode || 500;
|
||||||
|
if (statusCode >= 400) {
|
||||||
|
throw new Error(`Failed to get UPX release ${version} from ${url} with status code ${statusCode}: ${body}`);
|
||||||
}
|
}
|
||||||
|
const releases = <Record<string, GitHubRelease>>JSON.parse(body);
|
||||||
|
if (!releases[version]) {
|
||||||
|
throw new Error(`Cannot find UPX release ${version} in ${url}`);
|
||||||
|
}
|
||||||
|
return releases[version];
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getUPX(version: string): Promise<string> {
|
||||||
|
const release: GitHubRelease = await getRelease(version);
|
||||||
const semver: string = release.tag_name.replace(/^v/, '');
|
const semver: string = release.tag_name.replace(/^v/, '');
|
||||||
core.info(`UPX ${semver} found`);
|
core.info(`UPX ${semver} found`);
|
||||||
core.endGroup();
|
|
||||||
|
|
||||||
const filename = util.format('%s.%s', getName(semver), osPlat == 'win32' ? 'zip' : 'tar.xz');
|
const filename = util.format('%s.%s', getName(semver), osPlat == 'win32' ? 'zip' : 'tar.xz');
|
||||||
const downloadUrl = util.format('https://github.com/upx/upx/releases/download/v%s/%s', semver, filename);
|
const downloadUrl = util.format('https://github.com/upx/upx/releases/download/v%s/%s', semver, filename);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
|
import * as path from 'path';
|
||||||
import * as context from './context';
|
import * as context from './context';
|
||||||
import * as installer from './installer';
|
import * as installer from './installer';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
@@ -14,6 +15,13 @@ async function run(): Promise<void> {
|
|||||||
const inputs: context.Inputs = await context.getInputs();
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
const upx = await installer.getUPX(inputs.version);
|
const upx = await installer.getUPX(inputs.version);
|
||||||
|
|
||||||
|
if (inputs.installOnly) {
|
||||||
|
const dir = path.dirname(upx);
|
||||||
|
core.addPath(dir);
|
||||||
|
core.debug(`Added ${dir} to PATH`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const files: string[] = context.resolvePaths(inputs.files);
|
const files: string[] = context.resolvePaths(inputs.files);
|
||||||
if (files.length == 0) {
|
if (files.length == 0) {
|
||||||
core.warning(`No files were found. Please check the 'files' input.`);
|
core.warning(`No files were found. Please check the 'files' input.`);
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"newLine": "lf",
|
"newLine": "lf",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"useUnknownInCatchVariables": false,
|
"useUnknownInCatchVariables": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user