mirror of
https://github.com/kou029w/_.git
synced 2025-02-04 16:18:41 +00:00
Compare commits
2 commits
e1acc48679
...
9bc1cc6e40
Author | SHA1 | Date | |
---|---|---|---|
|
9bc1cc6e40 | ||
12f2da15ee |
1 changed files with 22 additions and 0 deletions
22
.github/workflows/update-latest-release.yml
vendored
Normal file
22
.github/workflows/update-latest-release.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: update-latest-release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo ok > hello.txt
|
||||||
|
- uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { data: release } = await github.rest.repos.getLatestRelease(context.repo);
|
||||||
|
|
||||||
|
const name = "hello.txt";
|
||||||
|
const data = await require("node:fs").promises.readFile(name);
|
||||||
|
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
...context.repo,
|
||||||
|
release_id: release.id,
|
||||||
|
name,
|
||||||
|
data,
|
||||||
|
});
|
Loading…
Add table
Reference in a new issue