mirror of
https://github.com/kou029w/_.git
synced 2025-02-05 00:28:42 +00:00
Compare commits
2 commits
dfb63e24b7
...
72defd3ae1
Author | SHA1 | Date | |
---|---|---|---|
|
72defd3ae1 | ||
12f2da15ee |
2 changed files with 12 additions and 37 deletions
18
.github/workflows/update-empty-branch.yml
vendored
18
.github/workflows/update-empty-branch.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
name: update-empty-branch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
jobs:
|
|
||||||
main:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- run: |
|
|
||||||
git worktree add --track -b empty empty origin/empty
|
|
||||||
rm -rf empty/*
|
|
||||||
git config user.name bot
|
|
||||||
git config user.email '<>'
|
|
||||||
git -C empty add --all
|
|
||||||
git -C empty commit --allow-empty --message "based on $(git rev-parse @)"
|
|
||||||
git -C empty push origin empty
|
|
31
.github/workflows/update-latest-release.yml
vendored
31
.github/workflows/update-latest-release.yml
vendored
|
@ -5,25 +5,18 @@ jobs:
|
||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: echo ok > hello.txt
|
- run: echo ok > hello.txt
|
||||||
# - uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
# with:
|
with:
|
||||||
# script: |
|
script: |
|
||||||
# const { data: release } = await github.rest.repos.getLatestRelease(context.repo);
|
const { data: release } = await github.rest.repos.getLatestRelease(context.repo);
|
||||||
|
|
||||||
# const name = "hello.txt";
|
const name = "hello.txt";
|
||||||
# const data = await require("node:fs").promises.readFile(name);
|
const data = await require("node:fs").promises.readFile(name);
|
||||||
|
|
||||||
# await github.rest.repos.uploadReleaseAsset({
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
# ...context.repo,
|
...context.repo,
|
||||||
# release_id: release.id,
|
release_id: release.id,
|
||||||
# name,
|
name,
|
||||||
# data,
|
data,
|
||||||
# });
|
});
|
||||||
- run: |
|
|
||||||
latest=$(gh release view --json tagName --jq .tagName)
|
|
||||||
gh release delete-asset "${latest}" hello.txt || :
|
|
||||||
gh release upload "${latest}" hello.txt
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue