mirror of
https://github.com/kou029w/_.git
synced 2025-02-05 00:28:42 +00:00
23 lines
602 B
YAML
23 lines
602 B
YAML
|
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,
|
||
|
});
|