mirror of
https://github.com/kou029w/yama.git
synced 2025-01-30 22:08:00 +00:00
update actions
This commit is contained in:
parent
b6009672e1
commit
a7f88f0eef
2 changed files with 8 additions and 8 deletions
4
.github/scripts/release.js
vendored
4
.github/scripts/release.js
vendored
|
@ -16,7 +16,7 @@ module.exports = async function ({ github, context, glob }) {
|
|||
.basename(file)
|
||||
.replace(/^yama-armhf[.]/, `yama-${version}-armhf.`);
|
||||
const data = await fs.readFile(file);
|
||||
await github.repos.uploadReleaseAsset({ ...target, name, data });
|
||||
await github.rest.repos.uploadReleaseAsset({ ...target, name, data });
|
||||
const hash = crypto.createHash("sha256").update(data).digest("hex");
|
||||
body = `${body}
|
||||
${name.split(".").includes("img") ? "OS イメージ" : "ファイルシステム"}
|
||||
|
@ -24,5 +24,5 @@ ${name.split(".").includes("img") ? "OS イメージ" : "ファイルシステ
|
|||
- ${name} (SHA256: \`${hash}\`)
|
||||
`;
|
||||
}
|
||||
await github.repos.updateRelease({ ...target, body, prerelease: false });
|
||||
await github.rest.repos.updateRelease({ ...target, body, prerelease: false });
|
||||
};
|
||||
|
|
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -9,7 +9,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install -y qemu-user-static
|
||||
- run: sudo bin/build
|
||||
- uses: actions/upload-artifact@v2
|
||||
|
@ -22,10 +21,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
with: { name: yama-armhf }
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: yama-armhf
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require("./.github/scripts/release.js");
|
||||
await script({ github, context, glob });
|
||||
const release = require("./.github/scripts/release.js");
|
||||
await release({ github, context, glob });
|
||||
|
|
Loading…
Add table
Reference in a new issue