4 Commits

Author SHA1 Message Date
ef409f92f8 fix: var type 2023-12-01 17:46:40 +08:00
bfd657c820 fix: Add docs about fetch api on nodejs<18 2023-12-01 17:31:13 +08:00
17144997f2 fix: move main.js to root dir, fix ncc build error
ref: https://github.com/vercel/ncc/issues/791
2023-12-01 17:03:41 +08:00
8e3a904f48 fix: more log 2023-12-01 16:25:57 +08:00
6 changed files with 105 additions and 304 deletions

View File

@ -23,6 +23,8 @@ The following are optional as `step.with` keys
```yaml
uses: akkuman/gitea-release-action@v1.0.0
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
bin/**
@ -34,4 +36,4 @@ If you want to ignore ssl verify error, you can set env `NODE_TLS_REJECT_UNAUTHO
- [softprops/action-gh-release: 📦 GitHub Action for creating GitHub Releases](https://github.com/softprops/action-gh-release)
- [sigyl-actions/gitea-action-release-asset](https://github.com/sigyl-actions/gitea-action-release-asset)
- [actions/release-action: An action written by Golang to support publishing release to Gitea(not Github Actions compatible) - release-action - Gitea: Git with a cup of tea](https://gitea.com/actions/release-action)
- [actions/release-action: An action written by Golang to support publishing release to Gitea(not Github Actions compatible) - release-action - Gitea: Git with a cup of tea](https://gitea.com/actions/release-action)

380
dist/index.js vendored

File diff suppressed because it is too large Load Diff

3
dist/package.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@ -12,8 +12,8 @@ async function run() {
const name = core.getInput("name")
const body = core.getInput("body")
const tag_name = core.getInput("tag_name")
const draft = core.getInput("draft")
const prerelease = core.getInput("prerelease")
const draft = Boolean(core.getInput("draft"))
const prerelease = Boolean(core.getInput("prerelease"))
const files = core.getInput("files")
const repository = core.getInput("repository")
const token = core.getInput("token")
@ -41,6 +41,7 @@ async function run() {
await uploadFiles(gitea_client, owner, repo, response.id, all_files)
console.log(`🎉 Release ready at ${response.html_url}`);
} catch (error) {
console.log(error);
core.setFailed(error.message);
}
}

5
package-lock.json generated
View File

@ -11,8 +11,10 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@vercel/ncc": "^0.38.1",
"gitea-api": "^1.17.3-1"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1"
}
},
"node_modules/@actions/core": {
@ -174,6 +176,7 @@
"version": "0.38.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
"integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
}

View File

@ -2,11 +2,13 @@
"name": "gitea-release-action",
"version": "1.0.0",
"description": "",
"main": "src/main.js",
"type": "module",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"package": "ncc build src/main.js -o dist",
"build": "ncc build src/main.js"
"package": "ncc build main.js -o dist",
"build": "ncc build main.js",
"start": "node main.js"
},
"keywords": [],
"author": "",
@ -14,7 +16,9 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@vercel/ncc": "^0.38.1",
"gitea-api": "^1.17.3-1"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1"
}
}